Skip to content

Enable codecov coverage checks#65

Open
kdacosta0 wants to merge 2 commits intomainfrom
add-codecov-coverage
Open

Enable codecov coverage checks#65
kdacosta0 wants to merge 2 commits intomainfrom
add-codecov-coverage

Conversation

@kdacosta0
Copy link
Copy Markdown
Member

Summary

  • Adds a GitHub Actions workflow (.github/workflows/code-coverage.yml) that runs Python tests with coverage via Hatch on every PR and push to main, then uploads the report to Codecov.
  • Adds codecov.yml with coverage status thresholds:
    • Patch coverage: 70% target with 5% threshold — new/changed lines in a PR must maintain at least 70% coverage (with 5% tolerance before the check fails).
    • Project coverage: auto target, informational only — tracks overall project coverage trend without blocking PRs.
  • Adds coverage.xml and htmlcov/ to .gitignore to keep generated coverage artifacts out of version control.

Setup Required

CODECOV_TOKEN must be configured as a repository secret in GitHub. Without this token, the Codecov upload step will fail (fail_ci_if_error: true). Repository admins should:

  1. Create an account/project at codecov.io for this repository
  2. Copy the upload token
  3. Add it as a repository secret named CODECOV_TOKEN in GitHub Settings > Secrets and variables > Actions

Test Plan

  • Verify the Code Coverage workflow triggers on PRs targeting main
  • Verify coverage.xml and htmlcov/ are listed in .gitignore and not tracked by git
  • Verify Codecov receives the coverage report after a successful workflow run
  • Verify Codecov PR status checks appear (patch and project)

Implements SECURESIGN-4375

kdacosta0 added 2 commits May 7, 2026 15:18
…thresholds [SECURESIGN-4375]

Implements SECURESIGN-4375

Assisted-by: Claude Code
hatch test -c manages coverage internally via coverage.py and does not
accept pytest-cov flags. Generate the XML report in a separate step
using the hatch test environment's coverage tool.

Implements SECURESIGN-4375

Assisted-by: Claude Code
@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