-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Problem
The CI runs npm run test:run but does not collect or report code coverage. There is no visibility into how well the codebase is tested, and no mechanism to prevent coverage regression. The @vitest/coverage-v8 package is already installed but unused in CI.
Scope of Work
1. Switch CI test command to use coverage
In .github/workflows/ci.yml, change npm run test:run to npm run test:coverage.
2. Add coverage thresholds in vitest config
In vitest.config.ts (or the vitest section of astro.config.mjs), add coverage thresholds. Start conservatively and ratchet up over time:
coverage: {
provider: 'v8',
thresholds: {
lines: 10,
branches: 10,
functions: 10,
statements: 10,
},
}3. Upload coverage artifact
Add a step to upload the coverage report as a build artifact so it can be reviewed.
4. (Optional) PR coverage comment
Consider adding a step (e.g., via davelosert/vitest-coverage-report-action) to post a coverage summary as a PR comment.
Acceptance Criteria
- CI runs
test:coverageinstead oftest:run - Coverage thresholds are configured in vitest config
- CI fails if coverage drops below thresholds
- Coverage report is uploaded as a build artifact
- Current codebase passes the initial thresholds
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request