Running FE jest tests on github.

This commit is contained in:
Roland 2025-12-06 07:53:01 -07:00
parent a3b16f8a47
commit e1a6adfde3
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
2 changed files with 41 additions and 22 deletions

39
.github/workflows/jest-tests.yml vendored Normal file
View file

@ -0,0 +1,39 @@
name: Jest Tests
on:
push:
branches: [master, feature/*]
pull_request:
branches: [master]
jobs:
jest-tests:
runs-on: ubuntu-latest
defaults:
run:
working-directory: app
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: app/package-lock.json
- name: Install dependencies
run: npm install --legacy-peer-deps
- name: Run Jest tests
run: CI=true npm test -- --watchAll=false --coverage --coverageReporters=text --coverageReporters=lcov
- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: app/coverage
retention-days: 30