From 0daf7720dc45a4427e426d88d57b9f61b442eea8 Mon Sep 17 00:00:00 2001 From: Thomas Richter Date: Tue, 3 Feb 2026 23:40:36 +0100 Subject: [PATCH] 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) --- .gitea/workflows/build.yaml | 41 +++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index b635abf..c5fdafd 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -15,7 +15,48 @@ env: IMAGE_NAME: admin/taskplaner 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: + needs: test runs-on: ubuntu-latest steps: - name: Checkout