ci(coverage): add Codecov integration with OIDC auth#3684
Conversation
Add .codecov.yaml config mirroring the PAC project settings: 5% project threshold, patch gating disabled, generated/vendor/ test/docs/operatorhub directories excluded from coverage. Update go-coverage.yml to upload coverage to Codecov using OIDC (no token secret required), tagged with the unit-tests flag, alongside the existing fgrosse/go-coverage-report step. Signed-off-by: Jawed khelil <jkhelil@redhat.com> Assisted-by: Claude Sonnet 4.6 (via Cursor) Co-authored-by: Cursor <cursoragent@cursor.com>
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 ☂️ |
|
/lgtm |
|
@chmouel: changing LGTM is restricted to collaborators DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: pramodbindal The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
| ignore: | ||
| - "**/zz_generated*.go" | ||
| - "pkg/client/**" | ||
| - "pkg/apis/**" |
There was a problem hiding this comment.
why is that directory ignored? I see most files there have corresponding test file.
| files: ${{ github.workspace }}/src/github.com/tektoncd/operator/coverage.txt | ||
| flags: unit-tests | ||
| use_oidc: true | ||
| fail_ci_if_error: true |
There was a problem hiding this comment.
Do we really want to block the PR (because it runs on pull_requests and push) if for some reason this fails to upload the data? IMO that should be false or use continue-on-error: true.
Changes
Add Codecov integration to track and gate coverage on PRs
.codecov.yaml(new file):main).github/workflows/go-coverage.yml(updated):codecov/codecov-action@v6.0.2upload step with OIDC authCODECOV_TOKENsecret required — uses GitHub OIDC JWTunit-testsflag for future flag analyticsfail_ci_if_error: trueso upload failures surface in CIfgrosse/go-coverage-reportPR comment stepJira: https://redhat.atlassian.net/browse/SRVKP-12309
Submitter Checklist
make test lintbefore submitting a PRRelease Notes
Made with Cursor