Overview & Background
To maintain high code quality across the codebase as open-source contributors submit pull requests, an automated test coverage enforcement gate is required in GitHub Actions CI to prevent coverage regressions.
Technical Specification & Architecture
-
Vitest Coverage Configuration:
- Configure
@vitest/coverage-v8 in backend/vitest.config.ts and frontend/vitest.config.ts.
- Set minimum coverage thresholds:
- Statements: 80%
- Branches: 75%
- Functions: 80%
- Lines: 80%
-
GitHub Actions Integration:
- Add coverage generation step in
.github/workflows/ci.yml.
- Post automated coverage summary comment on pull requests.
- Fail PR build if coverage decreases by $> 1%$.
Target Files
backend/vitest.config.ts
frontend/vitest.config.ts
.github/workflows/ci.yml
.github/codecov.yml
Acceptance Criteria
Overview & Background
To maintain high code quality across the codebase as open-source contributors submit pull requests, an automated test coverage enforcement gate is required in GitHub Actions CI to prevent coverage regressions.
Technical Specification & Architecture
@vitest/coverage-v8inbackend/vitest.config.tsandfrontend/vitest.config.ts..github/workflows/ci.yml.Target Files
backend/vitest.config.tsfrontend/vitest.config.ts.github/workflows/ci.yml.github/codecov.ymlAcceptance Criteria