feat(09-04): add test job to CI pipeline

- Add test job with type checking, unit tests, and E2E tests
- Install Playwright browsers for E2E testing
- Upload coverage and playwright reports as artifacts
- Build job now depends on test job (fail-fast)
This commit is contained in:
Thomas Richter
2026-02-03 23:40:36 +01:00
parent a98c06f0a0
commit 0daf7720dc

View File

@@ -15,7 +15,48 @@ env:
IMAGE_NAME: admin/taskplaner IMAGE_NAME: admin/taskplaner
jobs: jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run type check
run: npm run check -- --output machine
- name: Install Playwright browsers
run: npx playwright install --with-deps chromium
- name: Run unit tests with coverage
run: npm run test:coverage
- name: Run E2E tests
run: npm run test:e2e
env:
CI: true
- name: Upload test artifacts
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results
path: |
coverage/
playwright-report/
test-results/
retention-days: 7
build: build:
needs: test
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout