Skip to content

feat: add Tarpaulin-based code coverage reporting#162

Merged
kalwalt merged 4 commits into
devfrom
copilot/add-coverage-report
May 24, 2026
Merged

feat: add Tarpaulin-based code coverage reporting#162
kalwalt merged 4 commits into
devfrom
copilot/add-coverage-report

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 23, 2026

Summary

Closes #136

Adds end-to-end code coverage reporting to the project using cargo-tarpaulin in CI and locally, with results uploaded to Codecov.


Changes

.github/workflows/coverage.yml (new)

  • New GitHub Actions workflow triggered on every push and pull request to main and dev.
  • Installs cargo-tarpaulin, generates a Cobertura XML report covering the whole workspace (--workspace).
  • Uploads the report to Codecov via codecov/codecov-action@v5 with token: ${{ secrets.CODECOV_TOKEN }}.
  • Archives the raw coverage/ output as a build artefact on every run (actions/upload-artifact@v5).
  • Uses Swatinem/rust-cache@v2 to cache Rust build artefacts and speed up repeated runs.

.tarpaulin.toml (new)

  • Shared tarpaulin configuration so CI and the local helper script behave identically:
    • timeout = 300
    • ignore-panics = true
    • Excludes tests/* and benches/* from coverage.

scripts/coverage.sh (new)

  • Convenience shell script for generating an HTML coverage report locally with a single command: ./scripts/coverage.sh.
  • Cleans previous output, runs tarpaulin with --verbose, and auto-opens the report in the default browser (macOS / Linux).

README.md

  • Added Codecov badge below the CI badge.
  • Added a new 📈 Code Coverage section with:
    • Instructions for generating a report locally (script + direct tarpaulin command).
    • Coverage targets table (75 % minimum / 85 %+ desirable / 95 %+ for the marker-tracking critical path).

Notes

  • CODECOV_TOKEN is configured in the repo secrets and is active once merged to main; fail_ci_if_error: false prevents the upload step from blocking CI on this PR.
  • Coverage is intentionally scoped to library code — tests/* and benches/* are excluded.

Copilot AI linked an issue May 23, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Add coverage report to the project feat: add Tarpaulin-based code coverage reporting May 23, 2026
Copilot AI requested a review from kalwalt May 23, 2026 22:24
@kalwalt kalwalt changed the base branch from main to dev May 23, 2026 22:34
@codecov
Copy link
Copy Markdown

codecov Bot commented May 24, 2026

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment

Thanks for integrating Codecov - We've got you covered ☂️

@kalwalt kalwalt marked this pull request as ready for review May 24, 2026 11:57
Copy link
Copy Markdown
Member

@kalwalt kalwalt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok ready to be merged.

@kalwalt kalwalt merged commit 0b80c59 into dev May 24, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(feat) add coverage report to the project

2 participants