Skip to content

ci: wire up backend and frontend coverage reporting#56

Merged
tbjers merged 1 commit into
mainfrom
ci/wire-up-category-coverage
Jul 7, 2026
Merged

ci: wire up backend and frontend coverage reporting#56
tbjers merged 1 commit into
mainfrom
ci/wire-up-category-coverage

Conversation

@tbjers

@tbjers tbjers commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • backend-coverage job now reports its coverage under category: backend (using the multi-category support from Support multiple named coverage categories per project #55).
  • test-e2e job now instruments the SvelteKit dashboard with vite-plugin-istanbul (gated behind VITE_COVERAGE, so plain dev/test:e2e stay uninstrumented), converts the resulting Istanbul coverage to LCOV via nyc, and reports it under category: frontend. Previously this job produced no coverage data at all — it only uploaded the Playwright HTML report as an artifact.
  • Added dashboard/tests/coverage-fixture.ts, an auto-fixture that dumps each e2e test's window.__coverage__ to .nyc_output/; existing specs now import test/expect from it instead of @playwright/test directly.
  • Renamed the Worker in wrangler.json from coverage-tracker to demo-coveragetracker-dev.

Caveats worth knowing

  • The demo worker (demo.coveragetracker.dev) needs to be redeployed with Support multiple named coverage categories per project #55's category-aware ingest before this actually produces two distinct series — until then, the old ingest schema silently drops the unknown category field and the backend/frontend posts will overwrite each other on the same commit (no error, just a flapping single series).
  • Both jobs post a PR check named "Coverage Tracker"postCheckRun hardcodes that name, so PRs will show two identically-named checks with no way to tell them apart. Threading category into the check name is a natural follow-up, not done here.
  • The frontend number reflects e2e coverage of what the existing Playwright suite renders (a11y checks + two render tests against mocked APIs) — currently ~74% lines — not unit-test coverage.

Test plan

  • npm run typecheck (dashboard) — clean
  • npm test (backend, vitest-pool-workers) — 102/102 passing
  • npm run test:e2e:coverage (dashboard) — 7/7 Playwright tests pass, produces a real, source-mapped coverage/lcov.info (~74% lines)
  • wrangler deploy --dry-run — validates cleanly under the new Worker name

🤖 Generated with Claude Code

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>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
demo-coveragetracker-dev e5091ae Jul 07 2026, 01:26 AM

@tbjers
tbjers merged commit 6de8e80 into main Jul 7, 2026
8 checks passed
@tbjers
tbjers deleted the ci/wire-up-category-coverage branch July 7, 2026 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant