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.
This commit is contained in:
parent
9247ea6196
commit
eca4e55c67
3 changed files with 75 additions and 10 deletions
73
.github/workflows/dev-checks.yml
vendored
73
.github/workflows/dev-checks.yml
vendored
|
|
@ -7,10 +7,59 @@ on:
|
|||
branches: [ "main" ]
|
||||
merge_group:
|
||||
|
||||
jobs:
|
||||
dev-check:
|
||||
runs-on: ubuntu-latest
|
||||
concurrency:
|
||||
group: ${{github.workflow}}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build Check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Use Node.js 20
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
cache: 'npm'
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Run build
|
||||
run: npm run build
|
||||
|
||||
lint-checks:
|
||||
name: ESLint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Use Node.js 20
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
cache: 'npm'
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Run lint check
|
||||
run: npm run lint
|
||||
|
||||
circular-dependencies:
|
||||
name: Circular Dependencies Check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Use Node.js 20
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
cache: 'npm'
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Check for circular dependencies
|
||||
run: npm run circular
|
||||
|
||||
api-changes:
|
||||
name: Manual API Changes Check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Use Node.js 20
|
||||
|
|
@ -21,10 +70,14 @@ jobs:
|
|||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Check for manual changes to API
|
||||
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)" ]
|
||||
- name: Check for circular dependencies
|
||||
run: npm run circular
|
||||
- name: Run build
|
||||
run: npm run build
|
||||
- name: Run lint check
|
||||
run: npm run lint
|
||||
run: |
|
||||
npm run api:generate
|
||||
if [ -n "$(git status --porcelain)" ]; then
|
||||
echo
|
||||
echo "✗ API manually changed, please refer to the README for the procedure to follow for programmatically generated API endpoints."
|
||||
exit 1
|
||||
else
|
||||
echo
|
||||
echo "✓ No manual API changes."
|
||||
exit 0
|
||||
fi
|
||||
|
|
|
|||
6
.github/workflows/playwright.yml
vendored
6
.github/workflows/playwright.yml
vendored
|
|
@ -6,6 +6,12 @@ on:
|
|||
workflow_dispatch:
|
||||
merge_group:
|
||||
|
||||
# this prevents multiple jobs from the same pr
|
||||
# running when new changes are pushed.
|
||||
concurrency:
|
||||
group: ${{github.workflow}}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
playwright-tests:
|
||||
runs-on:
|
||||
|
|
|
|||
6
.github/workflows/unit-tests.yml
vendored
6
.github/workflows/unit-tests.yml
vendored
|
|
@ -7,6 +7,12 @@ on:
|
|||
branches: [ "main" ]
|
||||
merge_group:
|
||||
|
||||
# this prevents multiple jobs from the same pr
|
||||
# running when new changes are pushed.
|
||||
concurrency:
|
||||
group: ${{github.workflow}}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
unit-tests:
|
||||
name: Service Tests
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue