test: add coverage reporting with regression thresholds
Add v8 coverage via a test:coverage script and vitest config: measure src only, exclude the types-only deps.ts and the bin entrypoint main.ts, and gate on ratcheted thresholds (statements 85, branches 78, functions 90, lines 85) set just under current coverage. CI runs the unit+integration tier through coverage so a real drop fails the build.
This commit is contained in:
@@ -47,8 +47,8 @@ jobs:
|
||||
- name: Typecheck
|
||||
run: npm run typecheck
|
||||
|
||||
- name: Unit and integration tiers
|
||||
run: npm test
|
||||
- name: Unit and integration tiers (with coverage thresholds)
|
||||
run: npm run test:coverage
|
||||
|
||||
- name: End-to-end tier
|
||||
run: npm run test:e2e
|
||||
|
||||
Reference in New Issue
Block a user