debian-image-builder-frontend/.github/workflows/dev-checks.yml
regexowl 2ddfee409e test: Test with Node 20 only
This updates the test env to test with Node 20 only, pr_check is also updated to use Node 20.

The changes shouldn't affect users in any way, please let me know if you think it might.

There were common async flakes when using testing-library with Node 18, those often surfaced in gh actions / pr_check only and did not reproduce locally unless resources got limited (I can reproduce some flakes in Power Saver mode only, leading me to conclusion, that it's just async being mischievous). Switching to testing with Node 20 only should also allow us to re-enable some tests that got disabled specifically because them running with Node 18 ended up in a time out.
2024-09-03 21:54:47 +02:00

33 lines
1 KiB
YAML

name: Development checks
on:
pull_request:
branches: [ "main" ]
jobs:
dev-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 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: Run build
run: npm run build
- name: Run lint check
run: npm run lint
- name: Run unit tests
run: npm run test:coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/junit.xml
verbose: true