ci: add test coverage reporting with v8 provider
- Add vitest.config.ts with v8 coverage provider - Add npm run test:coverage script - Add coverage step to CI (Node 22, reports in job summary) - Coverage tracks src/lib/ utilities (currently ~21% lines) - Install @vitest/coverage-v8 dev dependency
This commit is contained in:
9
.github/workflows/ci.yml
vendored
9
.github/workflows/ci.yml
vendored
@@ -31,6 +31,15 @@ jobs:
|
||||
- name: Test
|
||||
run: npm test
|
||||
|
||||
- name: Test coverage
|
||||
if: matrix.node-version == 22
|
||||
run: |
|
||||
npm run test:coverage
|
||||
echo "## Test Coverage" >> $GITHUB_STEP_SUMMARY
|
||||
echo '```' >> $GITHUB_STEP_SUMMARY
|
||||
npm run test:coverage 2>&1 | grep -A20 'Coverage report' >> $GITHUB_STEP_SUMMARY
|
||||
echo '```' >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
- name: Type check
|
||||
run: npx tsc --noEmit
|
||||
|
||||
|
||||
Reference in New Issue
Block a user