Skip to content

feat: add Codecov coverage reporting to pr-checks workflow#57

Merged
feloy merged 4 commits intokortex-hub:mainfrom
feloy:codecov
Mar 10, 2026
Merged

feat: add Codecov coverage reporting to pr-checks workflow#57
feloy merged 4 commits intokortex-hub:mainfrom
feloy:codecov

Conversation

@feloy
Copy link
Copy Markdown
Contributor

@feloy feloy commented Mar 10, 2026

Add steps to generate and upload code coverage reports to Codecov. Coverage is generated on Ubuntu only to avoid redundant uploads.

Closes #44

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 10, 2026

Warning

Rate limit exceeded

@feloy has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 19 minutes and 22 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5dfe3826-0f9f-4ee8-bc98-40b745c5b69e

📥 Commits

Reviewing files that changed from the base of the PR and between 2137b42 and 7b7ff8e.

📒 Files selected for processing (1)
  • .github/workflows/main-branch.yml
📝 Walkthrough

Walkthrough

Adds two GitHub Actions steps: one runs make test-coverage to produce coverage.out, the other uploads coverage.out to Codecov using codecov-action; both steps are restricted to the ubuntu-24.04 runner and appended to .github/workflows/pr-checks.yml. (48 words)

Changes

Cohort / File(s) Summary
GitHub Actions Workflow
.github/workflows/pr-checks.yml
Appends two steps to the PR checks workflow: run make test-coverage (generates coverage.out) and upload coverage to Codecov via codecov-action with fail_ci_if_error: true; both steps conditioned to run only on ubuntu-24.04.
Documentation / Badge
README.md
Adds a Codecov badge image link under the README title. No runtime or API 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)
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • ci: add checks on PR #13 — Modifies the same .github/workflows/pr-checks.yml workflow (introduced the verify-binary step that these new coverage steps are appended after).
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding Codecov coverage reporting to the pr-checks workflow, which matches the primary objective of the pull request.
Description check ✅ Passed The description is directly related to the changeset, explaining that steps were added to generate and upload code coverage reports to Codecov, and notes the limitation to Ubuntu to avoid redundancy.
Linked Issues check ✅ Passed The pull request successfully addresses both requirements from issue #44: workflow steps were added to send coverage to Codecov [#44], and a Codecov badge was added to the README [#44].
Out of Scope Changes check ✅ Passed All changes in the pull request are within scope and directly address the requirements of issue #44 (Codecov integration in workflow and README badge).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
.github/workflows/pr-checks.yml (1)

57-63: Switch Line 62 from file to files.

codecov/codecov-action v5 deprecates file in favor of files, 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

📥 Commits

Reviewing files that changed from the base of the PR and between 6dcec2e and ca0ef7d.

📒 Files selected for processing (1)
  • .github/workflows/pr-checks.yml

feloy and others added 2 commits March 10, 2026 17:17
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>
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between ca0ef7d and 4065bd8.

📒 Files selected for processing (2)
  • .github/workflows/pr-checks.yml
  • README.md
✅ Files skipped from review due to trivial changes (1)
  • README.md

@feloy feloy requested review from benoitf and jeffmaury March 10, 2026 16:20
Copy link
Copy Markdown
Contributor

@benoitf benoitf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is a missing codecov workflow from the main branch as well

(to track diff between the main branch and the PR)

@codecov-commenter
Copy link
Copy Markdown

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 ☂️

feloy and others added 2 commits March 10, 2026 17:38
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>
@feloy feloy requested a review from benoitf March 10, 2026 16:54
@feloy
Copy link
Copy Markdown
Contributor Author

feloy commented Mar 10, 2026

@benoitf I added a main branch workflow, if you want to check again

@feloy feloy merged commit 436678e into kortex-hub:main Mar 10, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

use codecov for coverage reports

3 participants