feat: add Codecov coverage reporting to pr-checks workflow#57
feat: add Codecov coverage reporting to pr-checks workflow#57feloy merged 4 commits intokortex-hub:mainfrom
Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds two GitHub Actions steps: one runs Changes
Sequence Diagram(s)sequenceDiagram
participant GH as GitHub Actions
participant Runner as ubuntu-24.04 Runner
participant Codecov as Codecov API
GH->>Runner: checkout repo & run existing steps
GH->>Runner: run "make test-coverage" (produces coverage.out)
Runner-->>GH: provide coverage.out artifact
GH->>Codecov: upload coverage.out via codecov-action (with token)
Codecov-->>GH: respond (success/failure)
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/pr-checks.yml (1)
57-63: Switch Line 62 fromfiletofiles.
codecov/codecov-actionv5 deprecatesfilein favor offiles, so this step is already on a legacy input surface. Small change now avoids churn on the next action upgrade. (github.com)Suggested update
- name: Upload coverage to Codecov if: matrix.os == 'ubuntu-24.04' uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2 with: token: ${{ secrets.CODECOV_TOKEN }} - file: ./coverage.out + files: ./coverage.out fail_ci_if_error: true🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/pr-checks.yml around lines 57 - 63, The Codecov upload step "Upload coverage to Codecov" is using the deprecated input key file; update the action inputs by replacing the `file: ./coverage.out` line with `files: ./coverage.out` (i.e., change the input key from `file` to `files` in the codecov/codecov-action step) so the workflow uses the v5-compatible parameter name.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.github/workflows/pr-checks.yml:
- Around line 57-63: The Codecov upload step "Upload coverage to Codecov" is
using the deprecated input key file; update the action inputs by replacing the
`file: ./coverage.out` line with `files: ./coverage.out` (i.e., change the input
key from `file` to `files` in the codecov/codecov-action step) so the workflow
uses the v5-compatible parameter name.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 8e9400cc-9b2c-411a-9add-125cf57d4918
📒 Files selected for processing (1)
.github/workflows/pr-checks.yml
Add steps to generate and upload code coverage reports to Codecov. Coverage is generated on Ubuntu only to avoid redundant uploads. Closes kortex-hub#44 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Signed-off-by: Philippe Martin <phmartin@redhat.com>
Add Codecov coverage badge to display code coverage status. Signed-off-by: Philippe Martin <phmartin@redhat.com> Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/pr-checks.yml:
- Around line 57-63: The "Upload coverage to Codecov" workflow step is using the
deprecated `file` input for
codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de (v5.x); replace
the `file: ./coverage.out` entry with the supported `files` input (either
`files: ./coverage.out` or a YAML array like `files: [./coverage.out]`) so the
coverage artifact is actually uploaded; update the step named "Upload coverage
to Codecov" in the workflow to use `files` instead of `file`.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: d1635f8d-44ca-4f25-8db3-6482fdcd639b
📒 Files selected for processing (2)
.github/workflows/pr-checks.ymlREADME.md
✅ Files skipped from review due to trivial changes (1)
- README.md
benoitf
left a comment
There was a problem hiding this comment.
there is a missing codecov workflow from the main branch as well
(to track diff between the main branch and the PR)
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. ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment Thanks for integrating Codecov - We've got you covered ☂️ |
Remove token parameter as secrets are not accessible during PR checks from forks. Codecov will use the tokenless upload for public repos. Signed-off-by: Philippe Martin <phmartin@redhat.com> Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add workflow that runs on pushes to main branch to track coverage over time. This complements the pr-checks workflow by ensuring main branch coverage is consistently reported to Codecov. Signed-off-by: Philippe Martin <phmartin@redhat.com> Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
@benoitf I added a main branch workflow, if you want to check again |
Add steps to generate and upload code coverage reports to Codecov. Coverage is generated on Ubuntu only to avoid redundant uploads.
Closes #44