Add Codecov CI upload and project configuration#229
Conversation
Upload cover.out from unit tests on pull requests and main pushes.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ibm-adarsh The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
✅ Deploy Preview for mcp-lifecycle-operator ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Hi @ibm-adarsh. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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-sigs/prow repository. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds Codecov integration: a GitHub Actions workflow runs tests and uploads ChangesCodecov Integration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
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 ☂️ |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/codecov.yaml:
- Around line 34-35: The CODECOV_TOKEN environment is being set unconditionally
for the codecov/codecov-action upload step which fails on fork PRs where the
secret is unavailable; update the upload step (the step that sets CODECOV_TOKEN)
to skip execution when the token is empty by adding a conditional guard (e.g.,
an if that checks secrets.CODECOV_TOKEN != '' or similar) so the upload is
skipped for forked PRs, leaving the rest of the workflow intact.
- Around line 19-20: The checkout step named "Clone the code" currently uses
actions/checkout without disabling credential persistence; update that step (the
actions/checkout@... usage) to include a with: persist-credentials: false
setting so GITHUB_TOKEN is not left configured for later Git commands.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 7f8b7262-ea14-406b-ba7c-0eefcbe59868
📒 Files selected for processing (3)
.codecov.yml.github/workflows/codecov.yamlsite-src/contributing/index.md
Add harden-runner and persist-credentials: false, rely on the Codecov GitHub App for upload, and enforce project/patch coverage gates.
|
|
Govul check fix: #228 |
|
@aliok , Please take a look once you get sometime. |
|
@ibm-adarsh can you add the codecov into the existing test workflow? Otherwise we are duplicating that test execution between two workflows for no need |

#130
Upload cover.out from unit tests on pull requests and main pushes.
Summary by CodeRabbit
New Features
Documentation
Chores