Skip to content

Add codecov configuration for coverage reporting#618

Merged
fain182 merged 3 commits into
mainfrom
claude/kind-wozniak-mCAZZ
May 29, 2026
Merged

Add codecov configuration for coverage reporting#618
fain182 merged 3 commits into
mainfrom
claude/kind-wozniak-mCAZZ

Conversation

@fain182
Copy link
Copy Markdown
Collaborator

@fain182 fain182 commented May 29, 2026

Summary

This PR adds a codecov.yml configuration file to establish coverage reporting standards and CI integration for the project.

Key Changes

  • Coverage precision and range: Set coverage display to 2 decimal places with a range of 70-100%
  • Project coverage requirements: Allow up to 1% coverage drop per PR with auto-target detection
  • Patch coverage requirements: Enforce 80% coverage on new/changed lines with 5% tolerance
  • CI integration: Configure codecov to wait for CI to pass and consolidate coverage uploads before computing status
  • Comment behavior: Update existing PR comments instead of posting new ones on each push
  • Exclusions: Exclude test files, examples, and bin directories from coverage calculations

Implementation Details

The configuration uses a balanced approach to coverage enforcement:

  • Project-level checks are lenient (1% threshold) to avoid blocking on minor coverage gaps
  • Patch-level checks are stricter (80% target) to maintain quality on new code
  • CI failures are treated as errors to prevent false positives from incomplete reports
  • Test and example code are excluded from coverage metrics to focus on production code quality

https://claude.ai/code/session_01V8XmVe48bhQkjeNRmGSm6n

Without a codecov.yml, Codecov applies strict defaults: any uncovered
line in a PR fails the patch check and the smallest project coverage
drop turns the status (and main) red. This adds sensible thresholds so a
single untested line no longer breaks the build.
@codecov
Copy link
Copy Markdown

codecov Bot commented May 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.29%. Comparing base (c5705ee) to head (3a9ecc9).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##               main     #618   +/-   ##
=========================================
  Coverage     98.29%   98.29%           
  Complexity      696      696           
=========================================
  Files            87       87           
  Lines          1991     1991           
=========================================
  Hits           1957     1957           
  Misses           34       34           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@AlessandroMinoccheri AlessandroMinoccheri self-assigned this May 29, 2026
@AlessandroMinoccheri AlessandroMinoccheri added the enhancement New feature or request label May 29, 2026
Comment thread codecov.yml Outdated
claude added 2 commits May 29, 2026 12:40
The patch target is an absolute 80%, so the 5% threshold only lowered the
real failure bar to 75% — making the declared standard misleading. Codecov
defaults the threshold to 0%, so omitting it keeps 80% as a hard bar.
Use an explicit 95% bar for overall project coverage instead of auto,
keeping the 1% threshold as tolerance for minor fluctuations.
Copy link
Copy Markdown
Member

@AlessandroMinoccheri AlessandroMinoccheri left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@fain182 fain182 merged commit bdf301a into main May 29, 2026
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants