mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-10 08:05:14 +02:00
ci: parallelize KTX CI checks
This commit is contained in:
parent
61ed276b44
commit
3e9869340f
4 changed files with 151 additions and 17 deletions
|
|
@ -31,7 +31,7 @@ describe('KTX CI artifact upload contract', () => {
|
|||
workflow,
|
||||
/name: Build and verify package artifacts\s+run: pnpm run artifacts:check\s+- name: Upload package artifacts/s,
|
||||
);
|
||||
assert.match(workflow, /uses: actions\/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f/);
|
||||
assert.match(workflow, /uses: actions\/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a/);
|
||||
assert.match(workflow, /name: ktx-package-artifacts-\$\{\{ github\.sha \}\}/);
|
||||
assert.match(workflow, /dist\/artifacts\/manifest\.json/);
|
||||
assert.match(workflow, /dist\/artifacts\/npm\/\*\.tgz/);
|
||||
|
|
|
|||
|
|
@ -13,25 +13,39 @@ function assertIncludesAll(text, values) {
|
|||
}
|
||||
|
||||
describe('standalone KTX CI workflow', () => {
|
||||
it('runs the package checks from a filtered repository root', async () => {
|
||||
it('runs package checks in parallel jobs from the repository root', async () => {
|
||||
const workflow = await readText('.github/workflows/ci.yml');
|
||||
|
||||
assert.match(workflow, /^name: KTX CI/m);
|
||||
assertIncludesAll(workflow, [
|
||||
'permissions:',
|
||||
'contents: read',
|
||||
'typescript-checks:',
|
||||
'name: TypeScript checks',
|
||||
'slow-context-tests:',
|
||||
'name: Slow context tests',
|
||||
'slow-cli-tests:',
|
||||
'name: Slow CLI tests',
|
||||
'cli-smoke-tests:',
|
||||
'name: CLI smoke tests',
|
||||
'python-checks:',
|
||||
'name: Python checks',
|
||||
'artifact-checks:',
|
||||
'name: Artifact checks',
|
||||
'actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd',
|
||||
'pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061',
|
||||
'actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238',
|
||||
'pnpm/action-setup@739bfe42ca9233c5e6aca07c1a25a9d34aca49b0',
|
||||
'actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e',
|
||||
'node-version: "24"',
|
||||
'cache-dependency-path: "pnpm-lock.yaml"',
|
||||
'pnpm install --frozen-lockfile',
|
||||
'pnpm run check',
|
||||
'pnpm run test:slow',
|
||||
'pnpm run build',
|
||||
'pnpm --filter @ktx/context run test:slow',
|
||||
'pnpm --filter @ktx/cli run test:slow',
|
||||
'pnpm run smoke',
|
||||
'actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405',
|
||||
'python-version: "3.13"',
|
||||
'astral-sh/setup-uv@eac588ad8def6316056a12d4907a9d4d84ff7a3b',
|
||||
'astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b',
|
||||
'cache-dependency-glob: "uv.lock"',
|
||||
'uv sync --all-packages',
|
||||
'uv run pytest',
|
||||
|
|
@ -42,13 +56,14 @@ describe('standalone KTX CI workflow', () => {
|
|||
assert.doesNotMatch(workflow, /cd ktx/);
|
||||
assert.doesNotMatch(workflow, /ktx\/pnpm-lock\.yaml/);
|
||||
assert.doesNotMatch(workflow, /ktx\/uv\.lock/);
|
||||
assert.doesNotMatch(workflow, /run: pnpm run test:slow/);
|
||||
});
|
||||
|
||||
it('uploads verified artifacts from root-relative paths', async () => {
|
||||
const workflow = await readText('.github/workflows/ci.yml');
|
||||
|
||||
assertIncludesAll(workflow, [
|
||||
'actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f',
|
||||
'actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a',
|
||||
'name: ktx-package-artifacts-${{ github.sha }}',
|
||||
'dist/artifacts/manifest.json',
|
||||
'dist/artifacts/npm/*.tgz',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue