Skip to content

ci: add Devel::Cover + Codecov coverage reporting#40

Draft
toddr-bot wants to merge 2 commits intocpan-authors:mainfrom
toddr-bot:koan.toddr.bot/ci-code-coverage
Draft

ci: add Devel::Cover + Codecov coverage reporting#40
toddr-bot wants to merge 2 commits intocpan-authors:mainfrom
toddr-bot:koan.toddr.bot/ci-code-coverage

Conversation

@toddr-bot
Copy link
Copy Markdown
Collaborator

@toddr-bot toddr-bot commented Apr 12, 2026

What

Adds a code coverage CI job reporting both Perl and XS/C coverage to Codecov.

Why

The project has no visibility into test coverage. As the test suite grows (7 test files now), knowing which code paths are exercised — especially in Mmap.xs — helps prioritize future test work.

How

  • New coverage job in testsuite.yml, runs after the ubuntu job
  • Perl coverage: Devel::Cover with statement/branch/condition/subroutine metrics
  • XS/C coverage: GCC gcov flags (--coverage) + lcov for report generation
  • Both reports uploaded to Codecov with separate flags (perl, xs)
  • All Codecov uploads use continue-on-error: true so missing token doesn't break CI

Testing

Notes

Requires CODECOV_TOKEN secret to be configured in the repo settings for uploads to work. Without it, the coverage job still runs and generates reports — only the upload step is skipped.

🤖 Generated with Claude Code


Quality Report

Changes: 1 file changed, 54 insertions(+)

Code scan: clean

Tests: passed (OK)

Branch hygiene: clean

Generated by Kōan post-mission quality pipeline

toddr-bot and others added 2 commits April 12, 2026 06:15
Adds a coverage CI job that runs tests under Devel::Cover for Perl
code and GCC's gcov for XS/C code, then uploads both reports to
Codecov. This provides visibility into test coverage gaps for both
the Perl module and the XS implementation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The perl-actions/install-with-cpm action treats the install value as a
single module name when space-separated. Switch to newline-separated
format so each module is installed independently.

Also drop Devel::Cover::Report::Codecov which was installed but never
used — the workflow generates cover -report json, not -report codecov.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codecov-commenter
Copy link
Copy Markdown

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.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants