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.
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.