Skip to content

Commit cd8b622

Browse files
workflows: split out dev checks into jobs
Split out the dev checks into multiple jobs, the benefit of this is that it will be easier to see which check is failing and why.
1 parent 8d1af27 commit cd8b622

3 files changed

Lines changed: 71 additions & 6 deletions

File tree

.github/workflows/dev-checks.yml

Lines changed: 59 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,14 @@ on:
77
branches: [ "main" ]
88
merge_group:
99

10+
concurrency:
11+
group: ${{github.workflow}}-${{ github.ref }}
12+
cancel-in-progress: true
13+
1014
jobs:
11-
dev-check:
15+
build:
16+
name: Build Check
1217
runs-on: ubuntu-latest
13-
1418
steps:
1519
- uses: actions/checkout@v4
1620
- name: Use Node.js 20
@@ -20,11 +24,60 @@ jobs:
2024
cache: 'npm'
2125
- name: Install dependencies
2226
run: npm ci
23-
- name: Check for manual changes to API
24-
run: npm run api:generate && [ -z "$(git status --porcelain=v1 2>/dev/null)" ] && echo "✓ No manual API changes." || echo "✗ API manually changed, please refer to the README for the procedure to follow for programmatically generated API endpoints." && [ -z "$(git status --porcelain=v1 2>/dev/null)" ]
25-
- name: Check for circular dependencies
26-
run: npm run circular
2727
- name: Run build
2828
run: npm run build
29+
30+
lint-checks:
31+
name: Linting Checks
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v4
35+
- name: Use Node.js 20
36+
uses: actions/setup-node@v4
37+
with:
38+
node-version: 20
39+
cache: 'npm'
40+
- name: Install dependencies
41+
run: npm ci
2942
- name: Run lint check
3043
run: npm run lint
44+
45+
circular-dependencies:
46+
name: Circular Dependencies Check
47+
runs-on: ubuntu-latest
48+
steps:
49+
- uses: actions/checkout@v4
50+
- name: Use Node.js 20
51+
uses: actions/setup-node@v4
52+
with:
53+
node-version: 20
54+
cache: 'npm'
55+
- name: Install dependencies
56+
run: npm ci
57+
- name: Check for circular dependencies
58+
run: npm run circular
59+
60+
api-changes:
61+
name: Manual API Changes Check
62+
runs-on: ubuntu-latest
63+
steps:
64+
- uses: actions/checkout@v4
65+
- name: Use Node.js 20
66+
uses: actions/setup-node@v4
67+
with:
68+
node-version: 20
69+
cache: 'npm'
70+
- name: Install dependencies
71+
run: npm ci
72+
- name: Check for manual changes to API
73+
run: |
74+
npm run api:generate
75+
if [ -n "$(git status --porcelain)" ]; then
76+
echo
77+
echo "✓ No manual API changes."
78+
exit 0
79+
else
80+
echo
81+
echo "✗ API manually changed, please refer to the README for the procedure to follow for programmatically generated API endpoints."
82+
exit 1
83+
fi

.github/workflows/playwright.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ on:
66
workflow_dispatch:
77
merge_group:
88

9+
# this prevents multiple jobs from the same pr
10+
# running when new changes are pushed.
11+
concurrency:
12+
group: ${{github.workflow}}-${{ github.ref }}
13+
cancel-in-progress: true
14+
915
jobs:
1016
playwright-tests:
1117
runs-on:

.github/workflows/unit-tests.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ on:
77
branches: [ "main" ]
88
merge_group:
99

10+
# this prevents multiple jobs from the same pr
11+
# running when new changes are pushed.
12+
concurrency:
13+
group: ${{github.workflow}}-${{ github.ref }}
14+
cancel-in-progress: true
15+
1016
jobs:
1117
unit-tests:
1218
name: Service Unit Tests

0 commit comments

Comments
 (0)