Problem Statement
Test coverage is not currently reported in CI results. After a pipeline run, there is no visibility into which parts of the codebase are covered by tests, making it hard to track regression risks or set coverage improvement goals.
Proposed Solution
Integrate a test coverage reporting step into the CI pipeline that:
- Runs the test suite with coverage instrumentation (e.g.
gcov/lcov for GCC, or llvm-cov for Clang).
- Generates a coverage report.
- Displays the coverage percentage directly in the CI job summary or as a PR comment.
- Optionally uploads the report to a coverage hosting service (e.g. Codecov or Coveralls) and adds a badge to the README.
Alternative Solutions
- Only generate a coverage report locally and document how to run it — no CI change, but results are not visible to reviewers.
- Use a third-party GitHub App for coverage tracking — less control over the setup.
Use Cases
- Use case 1: A reviewer checking a PR immediately sees whether the change maintains or improves coverage.
- Use case 2: A maintainer sets a minimum coverage threshold and the CI fails if it drops below it.
- Use case 3: The README displays an up-to-date coverage badge giving external contributors an instant quality signal.
Impact
- CI workflow changes only — no changes to source code.
- Slightly increased CI build time due to coverage instrumentation.
- No breaking changes.
Implementation Details (optional)
- Add a CMake/xmake configuration option to build with coverage flags (
--coverage or -fprofile-instr-generate -fcoverage-mapping).
- Add a CI step to generate the report and post it as a job summary using
lcov + genhtml or llvm-cov show.
- Integrate with Codecov by adding
codecov/codecov-action to the workflow and a codecov.yml config file.
Additional Context
N/A
Related Issues
Problem Statement
Test coverage is not currently reported in CI results. After a pipeline run, there is no visibility into which parts of the codebase are covered by tests, making it hard to track regression risks or set coverage improvement goals.
Proposed Solution
Integrate a test coverage reporting step into the CI pipeline that:
gcov/lcovfor GCC, orllvm-covfor Clang).Alternative Solutions
Use Cases
Impact
Implementation Details (optional)
--coverageor-fprofile-instr-generate -fcoverage-mapping).lcov+genhtmlorllvm-cov show.codecov/codecov-actionto the workflow and acodecov.ymlconfig file.Additional Context
N/A
Related Issues