Skip to content

Commit e5091ae

Browse files
tbjersclaude
andcommitted
ci: wire up backend and frontend coverage reporting
Backend and frontend jobs now report to separate category series (backend/frontend) using the multi-category support from #55, closing the gap where the Playwright job never produced coverage at all. Frontend coverage comes from Istanbul-instrumented e2e runs (nyc -> lcov), gated behind VITE_COVERAGE so plain dev/test runs stay uninstrumented. Also rename the worker to demo-coveragetracker-dev in wrangler.json. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent 03905be commit e5091ae

9 files changed

Lines changed: 2082 additions & 74 deletions

File tree

.github/workflows/ci.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ jobs:
3333
test-e2e:
3434
name: Playwright Tests
3535
runs-on: ubuntu-latest
36+
permissions:
37+
contents: read
38+
id-token: write # mint OIDC token for Worker ingest
39+
checks: write # post PR Check Run
3640
defaults:
3741
run:
3842
working-directory: dashboard
@@ -63,8 +67,8 @@ jobs:
6367
if: steps.playwright-cache.outputs.cache-hit == 'true'
6468
run: npx playwright install-deps chromium
6569

66-
- name: Run Playwright tests
67-
run: npx playwright test
70+
- name: Run Playwright tests with coverage
71+
run: npm run test:e2e:coverage
6872

6973
- name: Upload Playwright report
7074
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
@@ -74,6 +78,13 @@ jobs:
7478
path: dashboard/playwright-report/
7579
retention-days: 30
7680

81+
- name: Report coverage
82+
uses: CoverageTracker/coverage-tracker/.github/actions/report@v0.3.0
83+
with:
84+
worker-url: https://demo.coveragetracker.dev
85+
coverage-path: dashboard/coverage/lcov.info
86+
category: frontend
87+
7788
backend-coverage:
7889
name: Worker Coverage
7990
runs-on: ubuntu-latest
@@ -107,3 +118,4 @@ jobs:
107118
uses: CoverageTracker/coverage-tracker/.github/actions/report@v0.3.0
108119
with:
109120
worker-url: https://demo.coveragetracker.dev
121+
category: backend

dashboard/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ build/
77
.dev.vars
88
playwright-report/
99
test-results/
10+
.nyc_output/

0 commit comments

Comments
 (0)