Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Unit Tests & Coverage

on:
push:
branches: [main, pre-stage, dev]
pull_request:

jobs:
test-api:
runs-on: ubuntu-latest
defaults:
run:
working-directory: api
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: api/package-lock.json
- run: npm ci
- run: npm install @rollup/rollup-linux-x64-gnu --no-save
- run: npm run test:coverage
- uses: actions/upload-artifact@v4
if: always()
with:
name: api-coverage-report
path: api/coverage/

test-ui:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ui
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: ui/package-lock.json
- run: npm ci --legacy-peer-deps
- run: npm run test:coverage
- uses: actions/upload-artifact@v4
if: always()
with:
name: ui-coverage-report
path: ui/coverage/

test-upload-api:
runs-on: ubuntu-latest
defaults:
run:
working-directory: upload-api
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: upload-api/package-lock.json
- run: npm install --legacy-peer-deps
- run: npm run test:coverage
- uses: actions/upload-artifact@v4
if: always()
with:
name: upload-api-coverage-report
path: upload-api/coverage/
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -367,3 +367,6 @@ app.json
*MigrationData*
*.zip
app.json

# Test coverage (global)
coverage/
3 changes: 2 additions & 1 deletion api/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -367,4 +367,5 @@ database/
/migration-data
**/copy*
**copy.ts
manifest.json
manifest.json
coverage/
Loading