Summary
Set up code coverage reporting in the CI pipeline to track test coverage and ensure it stays above 80%.
Context
Coverage helps identify untested code paths and improve overall quality. cargo-tarpaulin or llvm-cov can be integrated with GitHub Actions.
Tasks
- Add a CI job using
cargo-tarpaulin (or cargo llvm-cov) to generate coverage reports.
- Configure the job to:
- Run on push and pull requests.
- Execute all tests (
cargo test --workspace).
- Generate coverage (e.g.,
cargo tarpaulin --out Xml --output-dir coverage).
- Upload coverage to Codecov or Coveralls (optional but recommended).
- Enforce a minimum coverage threshold (e.g., 80%) using a coverage gate.
- Add a badge to the README showing the current coverage percentage.
- Document how to run coverage locally.
Acceptance Criteria
- Coverage job runs in CI and reports a percentage.
- The threshold is configured (fails if below 80%).
- Badge is added to README.
Dependencies
- All tests from previous phases.
Summary
Set up code coverage reporting in the CI pipeline to track test coverage and ensure it stays above 80%.
Context
Coverage helps identify untested code paths and improve overall quality.
cargo-tarpaulinorllvm-covcan be integrated with GitHub Actions.Tasks
cargo-tarpaulin(orcargo llvm-cov) to generate coverage reports.cargo test --workspace).cargo tarpaulin --out Xml --output-dir coverage).Acceptance Criteria
Dependencies