Skip to content

Add Codecov upload to existing unit test workflow#65

Merged
kdacosta0 merged 1 commit into
mainfrom
add-codecov-coverage
May 18, 2026
Merged

Add Codecov upload to existing unit test workflow#65
kdacosta0 merged 1 commit into
mainfrom
add-codecov-coverage

Conversation

@kdacosta0
Copy link
Copy Markdown
Member

@kdacosta0 kdacosta0 commented May 7, 2026

Summary

  • Adds Codecov upload steps to the existing unit_tests.yml workflow for the ubuntu-latest / Python 3.12 matrix entry, avoiding a duplicate test run.
  • Adds push trigger on main to unit_tests.yml so Codecov can track baseline coverage.
  • Adds id-token: write permission for OIDC-based Codecov upload.
  • 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 unit test workflow triggers on PRs targeting main and on pushes to main
  • Verify Codecov upload only runs for the ubuntu-latest / Python 3.12 matrix entry
  • 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

🤖 Generated with Claude Code

Based on the doc

@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 ☂️

@kdacosta0 kdacosta0 marked this pull request as draft May 14, 2026 11:30
@kdacosta0 kdacosta0 force-pushed the add-codecov-coverage branch from 600cb78 to 5b985b4 Compare May 15, 2026 13:54
@kdacosta0 kdacosta0 marked this pull request as ready for review May 15, 2026 14:24
@kdacosta0 kdacosta0 marked this pull request as draft May 15, 2026 15:00
@kdacosta0 kdacosta0 force-pushed the add-codecov-coverage branch from 5b985b4 to 9fcacd4 Compare May 18, 2026 09:31
@kdacosta0 kdacosta0 changed the title Enable codecov coverage checks Add Codecov upload to existing unit test workflow May 18, 2026
@kdacosta0 kdacosta0 force-pushed the add-codecov-coverage branch from 9fcacd4 to cfa565f Compare May 18, 2026 09:34
Add Codecov upload to the existing unit_tests.yml workflow for the
ubuntu-latest / Python 3.12 matrix entry instead of a separate workflow.
Also add push-to-main trigger so Codecov can track baseline coverage.

Add codecov.yml with patch (70% target) and project (informational)
coverage thresholds.

Add coverage.xml and htmlcov/ to .gitignore.

Implements SECURESIGN-4375

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kdacosta0 kdacosta0 force-pushed the add-codecov-coverage branch from cfa565f to ef0b0af Compare May 18, 2026 10:17
@kdacosta0 kdacosta0 marked this pull request as ready for review May 18, 2026 10:30
@kdacosta0 kdacosta0 merged commit 3ad972c into main May 18, 2026
24 of 52 checks passed
@kdacosta0 kdacosta0 deleted the add-codecov-coverage branch May 18, 2026 12:04
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.

3 participants