ci: add Codecov coverage reporting - #33
Open
hasansezertasan wants to merge 1 commit into
Open
Conversation
Contributor
Reviewer's GuideAdds a dedicated Codecov reporting job to the CI pipeline, configures repository-wide Codecov behavior, and surfaces coverage via a new README badge, all while reusing existing coverage artifacts and avoiding extra test runs. File-Level Changes
Assessment against linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The
codecovjob downloads thecoverage-xmlartifact without specifying apath, so ifcoverage.xmlis not at the workflow’s working directory root you may need to align the upload path with how the artifact is currently structured. - Consider gating the Codecov upload step with an
ifcondition based onsecrets.CODECOV_TOKENor repository visibility, so that private repos without a token don’t silently skip uploads in a non-obvious way. - Review whether
codecovtruly needs to depend onvalidatein addition totest; if not, dropping the extra dependency can reduce unnecessary serialization of CI jobs.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The `codecov` job downloads the `coverage-xml` artifact without specifying a `path`, so if `coverage.xml` is not at the workflow’s working directory root you may need to align the upload path with how the artifact is currently structured.
- Consider gating the Codecov upload step with an `if` condition based on `secrets.CODECOV_TOKEN` or repository visibility, so that private repos without a token don’t silently skip uploads in a non-obvious way.
- Review whether `codecov` truly needs to depend on `validate` in addition to `test`; if not, dropping the extra dependency can reduce unnecessary serialization of CI jobs.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
hasansezertasan
force-pushed
the
ci/codecov
branch
from
July 23, 2026 16:17
09a0eb3 to
1715c0e
Compare
Add a codecov job to the CI workflow that consumes the existing coverage-xml artifact and uploads it via codecov/codecov-action, plus a root codecov.yml (auto targets, patch coverage, PR comments) and a coverage badge in the README. Adapted from #16. Stacked on the zizmor hardening (#39): the codecov job uses SHA-pinned actions, persist-credentials: false, and a least-privilege permissions block so it passes the zizmor pre-commit gate. Closes #24
hasansezertasan
force-pushed
the
ci/codecov
branch
from
August 7, 2026 10:35
1715c0e to
a6e1eaf
Compare
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.
Description
Publishes test coverage to Codecov.
The coverage plumbing already existed —
test.yamlproducescoverage.xml(on the 3.11 matrix leg) and uploads it as thecoverage-xmlartifact, which thesonarjob already consumes. This PR adds acodecovjob that mirrors that pattern: download the artifact, upload viacodecov/codecov-action@v5. No changes to the reusable test workflow, and no duplicated test run.Also adds:
codecov.yml—target: autowith a0.1%project threshold, patch coverage, andrequire_changes: trueon PR comments (from Litestarification #16).Notes for reviewers
CODECOV_TOKENrepo/org secret. For public reposcodecov-action@v5also supports tokenless upload from Actions, so this won't hard-fail without it.fail_ci_if_error: false— a Codecov outage won't red-X the build.Closes
Summary by Sourcery
Integrate Codecov coverage reporting into the CI pipeline and surface coverage status in project documentation.
CI:
Documentation:
Chores: