Skip to content

Commit b725745

Browse files
authored
Merge pull request #29 from vndv/add-skylos-ci-gate
ci: add Skylos quality gate
2 parents cb22a10 + 45e5f35 commit b725745

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,16 @@ jobs:
1414
steps:
1515
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
1616
with:
17+
fetch-depth: 0
1718
persist-credentials: false
1819
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
1920
with:
2021
node-version: 22
2122
cache: npm
23+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
24+
with:
25+
python-version: "3.11"
2226
- run: npm ci --ignore-scripts
2327
- run: npm run ci
28+
- run: pip install skylos
29+
- run: skylos . --gate

scripts/sync-readme-version.mjs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { readFile, writeFile } from 'node:fs/promises';
22

3-
const checkOnly = process.argv.includes('--check');
43
const packageJson = JSON.parse(await readFile(new URL('../package.json', import.meta.url), 'utf8'));
54
const readmeUrl = new URL('../README.md', import.meta.url);
65
const readme = await readFile(readmeUrl, 'utf8');
@@ -15,7 +14,7 @@ if (updated === readme) {
1514
process.exit(0);
1615
}
1716

18-
if (checkOnly) {
17+
if (process.argv.includes('--check')) {
1918
console.error(`README package version is stale. Run npm run sync:readme-version.`);
2019
process.exit(1);
2120
}

0 commit comments

Comments
 (0)