From 45e5f3500e1a7c4dc595f5d23f2e2b8fc6dca07e Mon Sep 17 00:00:00 2001 From: Ivan Matveev Date: Sun, 31 May 2026 14:18:31 +0200 Subject: [PATCH] ci: add Skylos quality gate --- .github/workflows/ci.yml | 6 ++++++ scripts/sync-readme-version.mjs | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3afb70b..0c40ab6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,10 +14,16 @@ jobs: steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd with: + fetch-depth: 0 persist-credentials: false - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e with: node-version: 22 cache: npm + - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 + with: + python-version: "3.11" - run: npm ci --ignore-scripts - run: npm run ci + - run: pip install skylos + - run: skylos . --gate diff --git a/scripts/sync-readme-version.mjs b/scripts/sync-readme-version.mjs index 41565d1..577fdc5 100644 --- a/scripts/sync-readme-version.mjs +++ b/scripts/sync-readme-version.mjs @@ -1,6 +1,5 @@ import { readFile, writeFile } from 'node:fs/promises'; -const checkOnly = process.argv.includes('--check'); const packageJson = JSON.parse(await readFile(new URL('../package.json', import.meta.url), 'utf8')); const readmeUrl = new URL('../README.md', import.meta.url); const readme = await readFile(readmeUrl, 'utf8'); @@ -15,7 +14,7 @@ if (updated === readme) { process.exit(0); } -if (checkOnly) { +if (process.argv.includes('--check')) { console.error(`README package version is stale. Run npm run sync:readme-version.`); process.exit(1); }