ci: upload coverage to Codecov and add the badge - #84
Draft
aryansk wants to merge 1 commit into
Draft
Conversation
The test job already runs coverage and uploads .coverage artifacts, but no one aggregates or publishes the numbers. Emit coverage.xml in the test job and upload it with codecov/codecov-action (fail_ci_if_error: false so CI stays green until the Codecov token or app is configured), gitignore the generated file, and add the Codecov badge to the README next to the build badge. Fixes shauryagangrade#64.
shauryagangrade
approved these changes
Aug 15, 2026
shauryagangrade
left a comment
Owner
There was a problem hiding this comment.
Solid PR: the CI change generates coverage.xml (needed by the action), uploads via codecov/codecov-action@v6, and the badge is wired into the README. No token is required for this public repo.
Notes (non-blocking):
- The badge will render "unknown" until the first successful upload on
main— expected. fail_ci_if_error: falsemeans a coverage upload failure won't fail CI; fine for a badge, but consider flipping it totrueonce the repo is confirmed on Codecov so silent regressions don't slip through.- Stacking: this exact CI/.gitignore/README change is duplicated in #85 and #86. This PR should be the owner of the codecov hunk; #85/#86 need a rebase onto
mainafter this merges or they will conflict.
Approve — ready to merge once you mark the PR ready for review.
This was referenced Aug 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #64.
Problem
CI already runs
coverage run -m pytestand uploads.coverageartifacts, but nothing aggregates or publishes the numbers — #24 asked for visible coverage tracking.Change
testjob now emitscoverage.xml(uv run coverage xml) after the coverage run.codecov/codecov-action@v6on every matrix job (main push + PR).fail_ci_if_error: falsekeeps CI green until the Codecov token secret or Codecov app is configured for the repo.coverage.xmladded to.gitignore(generated artifact).Acceptance criteria
Validation
uv run coverage run -m pytest && uv run coverage report && uv run coverage xml): 107 tests passed,coverage.xmlgenerated successfully.git diff --checkclean.