Skip to content

Commit d58766d

Browse files
committed
refactor(ci): consolidate spec compliance into main CI workflow
- Move spec-consistency job from spec-compliance.yml to ci.yml - Move spec-compliance (cucumber tests) job to ci.yml - Make spec-consistency a prerequisite for test matrix and cucumber tests - Delete spec-compliance.yml - All CI checks now in single workflow file for easier management
1 parent fc0b460 commit d58766d

2 files changed

Lines changed: 37 additions & 57 deletions

File tree

.github/workflows/ci.yml

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,27 @@ jobs:
4848
- name: Run fallow check
4949
run: npx fallow dead-code
5050

51+
spec-consistency:
52+
name: Spec Consistency
53+
runs-on: ubuntu-latest
54+
steps:
55+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
56+
with:
57+
persist-credentials: false
58+
- name: Check spec matches website
59+
run: |
60+
curl -sL \
61+
https://raw.githubusercontent.com/idempot-dev/website/main/docs/specs/idempotency.feature \
62+
-o /tmp/website.feature
63+
tail -n +5 tests/spec/idempotency.feature > /tmp/local.feature
64+
diff /tmp/local.feature /tmp/website.feature || {
65+
echo "::error::Spec file diverged from website. Run: pnpm run spec:sync"
66+
exit 1
67+
}
68+
5169
test:
5270
name: Test (Node.js ${{ matrix.node-version }})
53-
needs: [lint, commitlint, fallow]
71+
needs: [lint, commitlint, fallow, spec-consistency]
5472
runs-on: ubuntu-latest
5573
strategy:
5674
matrix:
@@ -203,6 +221,24 @@ jobs:
203221
- name: Run Deno tests
204222
run: pnpm run test:deno
205223

224+
spec-compliance:
225+
name: Spec Compliance (Cucumber)
226+
needs: [spec-consistency, lint, commitlint]
227+
runs-on: ubuntu-latest
228+
steps:
229+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
230+
with:
231+
persist-credentials: false
232+
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
233+
with:
234+
node-version: 22
235+
- name: Enable pnpm
236+
run: corepack enable
237+
- name: Install dependencies
238+
run: pnpm install --frozen-lockfile
239+
- name: Run cucumber spec tests
240+
run: pnpm run test:spec
241+
206242
validate-workflows:
207243
runs-on: ubuntu-latest
208244
permissions:

.github/workflows/spec-compliance.yml

Lines changed: 0 additions & 56 deletions
This file was deleted.

0 commit comments

Comments
 (0)