Skip to content

ci: add code coverage with Devel::Cover and Codecov#63

Draft
toddr-bot wants to merge 3 commits into
mainfrom
koan.toddr.bot/add-coverage-ci
Draft

ci: add code coverage with Devel::Cover and Codecov#63
toddr-bot wants to merge 3 commits into
mainfrom
koan.toddr.bot/add-coverage-ci

Conversation

@toddr-bot

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

Copy link
Copy Markdown

What

Adds a code coverage CI job that runs the test suite under Devel::Cover and uploads results to Codecov.

Why

Coverage visibility helps identify untested code paths and guides future test work. The current baseline is ~55% overall coverage (statement: 66%, branch: 49%, condition: 31%, subroutine: 80%).

How

  • New coverage job in the existing workflow, gated on the ubuntu job passing first
  • Uses cover -test with Devel::Cover to instrument test runs
  • Ignores test files themselves (-ignore_re '^t/') to focus on library coverage
  • Uploads results via codecov/codecov-action@v5 (requires CODECOV_TOKEN secret for private repos; works without for public repos)
  • Adds cover_db/ to .gitignore

Testing

  • Local cover -test run completed successfully with all 18 test files passing
  • Coverage breakdown: Daemon.pm 53%, Log.pm 61%, Test.pm 58%

🤖 Generated with Claude Code


Quality Report

Changes: 3 files changed, 26 insertions(+), 1 deletion(-)

Code scan: clean

Tests: passed (OK)

Branch hygiene: clean

Generated by Kōan post-mission quality pipeline

toddr-bot and others added 3 commits April 12, 2026 08:00
Adds a coverage job to the CI workflow that runs the test suite under
Devel::Cover and uploads results to Codecov. This provides visibility
into which code paths are exercised by tests (baseline: ~55% coverage).

Also adds cover_db/ to .gitignore to prevent accidental commits of
local coverage data.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Prevents Devel::Cover output from being included in CPAN tarballs
if someone runs `cover -test` before `make dist`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove Devel::Cover::Report::Codecov — the codecov-action reads
cover_db/ directly. The space-separated install string was also
being parsed as a single module name by cpm.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant