Skip to content

ci: enable codecov for Python test coverage - #1575

Merged
rapids-bot[bot] merged 9 commits into
mainfrom
ci/enable-codecov
Jul 17, 2026
Merged

ci: enable codecov for Python test coverage#1575
rapids-bot[bot] merged 9 commits into
mainfrom
ci/enable-codecov

Conversation

@ramakrishnap-nv

@ramakrishnap-nv ramakrishnap-nv commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Removes the explicit run_codecov: false override, adds codecov.yml (patch checks informational, never blocks), suppresses spurious coverage.py warnings, and excludes codecov.yml from changed-files triggers.

Requires CODECOV_TOKEN to be set as a repo/org secret.

Removes the explicit `run_codecov: false` override in pr.yaml and
test.yaml, restoring the shared-workflow default (true). Adds
codecov.yml at repo root with patch checks set to informational so
coverage never blocks a PR. Adds disable_warnings to .coveragerc to
suppress spurious coverage.py noise. Excludes codecov.yml from
changed-files triggers so a config-only edit does not re-run CI.

Note: requires CODECOV_TOKEN to be set as a repo or org secret.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Ramakrishna Prabhu <ramakrishnap@nvidia.com>
@ramakrishnap-nv
ramakrishnap-nv requested review from a team as code owners July 14, 2026 19:48
@ramakrishnap-nv ramakrishnap-nv self-assigned this Jul 14, 2026
@ramakrishnap-nv ramakrishnap-nv added non-breaking Introduces a non-breaking change improvement Improves an existing functionality labels Jul 14, 2026
@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Changes

Codecov configuration, Python coverage warning handling, and related pull-request workflow behavior are updated. The conda Python test job now passes CODECOV_TOKEN and no longer explicitly disables Codecov.

Codecov CI integration

Layer / File(s) Summary
Coverage configuration
codecov.yml, python/.coveragerc
Adds Codecov status, annotation, comment, and patch-threshold settings, while suppressing selected Python coverage warnings.
Workflow coverage integration
.github/workflows/pr.yaml
Excludes codecov.yml from four change groups and updates conda Python tests to pass CODECOV_TOKEN without explicitly disabling Codecov.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: iroy30

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: enabling Codecov for Python test coverage.
Description check ✅ Passed The description accurately describes the CI and coverage changes made in the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/enable-codecov

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

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown

CI Test Summary

✅ All 31 test job(s) passed.

@ramakrishnap-nv

Copy link
Copy Markdown
Collaborator Author

/ok to test 003e569

ramakrishnap-nv and others added 4 commits July 15, 2026 10:43
Signed-off-by: Ramakrishna Prabhu <ramakrishnap@nvidia.com>
Switch conda-python-tests in pr.yaml to secrets: inherit so CODECOV_TOKEN
reaches the shared-workflow codecov step. S3/AWS secrets are not needed
for PR builds (nightly_report_helper skips S3 when RAPIDS_BUILD_TYPE!=nightly).

Re-add run_codecov: false to test.yaml conda-python-tests since S3 explicit
secrets are required there for nightly report aggregation, leaving no slot
for CODECOV_TOKEN until rapidsai/shared-workflows#<TBD> lands.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Ramakrishna Prabhu <ramakrishnap@nvidia.com>
Use the same key/value pattern as S3/AWS secrets to pass CODECOV_TOKEN
to the conda-python-tests shared workflow. Requires rapidsai/shared-workflows#593.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Ramakrishna Prabhu <ramakrishnap@nvidia.com>
This reverts commit c06c38f.

Signed-off-by: Ramakrishna Prabhu <ramakrishnap@nvidia.com>
Comment thread .github/workflows/pr.yaml Outdated
S3/AWS secrets are not needed for PR builds so slot 1 is free.
Use script-env-secret-1 for CODECOV_TOKEN instead of secrets: inherit.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Ramakrishna Prabhu <ramakrishnap@nvidia.com>
ramakrishnap-nv and others added 3 commits July 16, 2026 16:41
The explicit script-env-secret-1 approach injects CODECOV_TOKEN via
GITHUB_ENV but the current shared workflow overrides it with an empty
secrets.CODECOV_TOKEN in the codecov step. Revert to inherit for now.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Ramakrishna Prabhu <ramakrishnap@nvidia.com>
…ges"

This reverts commit 8a511a9.

Signed-off-by: Ramakrishna Prabhu <ramakrishnap@nvidia.com>
Signed-off-by: Ramakrishna Prabhu <ramakrishnap@nvidia.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/pr.yaml:
- Around line 419-421: Update the reusable workflow invocation in pr.yaml so
CODECOV_TOKEN is passed through to the shared workflow’s Codecov upload step,
using secrets inheritance or the workflow’s supported declared secret input
instead of relying only on script-env-secret-1-key/script-env-secret-1-value.
Preserve the existing test script environment mapping as needed, and verify a
private-repository run completes the Codecov upload.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 0f740f6b-9059-46b5-9d86-6b6384712bcb

📥 Commits

Reviewing files that changed from the base of the PR and between 8a511a9 and 6536236.

📒 Files selected for processing (1)
  • .github/workflows/pr.yaml

Comment thread .github/workflows/pr.yaml
Comment on lines 419 to +421
secrets:
script-env-secret-1-key: CUOPT_S3_URI
script-env-secret-1-value: ${{ secrets.CUOPT_S3_URI }}
script-env-secret-2-key: CUOPT_AWS_ACCESS_KEY_ID
script-env-secret-2-value: ${{ secrets.CUOPT_AWS_ACCESS_KEY_ID }}
script-env-secret-3-key: CUOPT_AWS_SECRET_ACCESS_KEY
script-env-secret-3-value: ${{ secrets.CUOPT_AWS_SECRET_ACCESS_KEY }}
script-env-secret-1-key: CODECOV_TOKEN
script-env-secret-1-value: ${{ secrets.CODECOV_TOKEN }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Ensure CODECOV_TOKEN reaches the reusable workflow’s upload step.

This explicit script-env-secret-1-* mapping may only expose the token to ci/test_python.sh; the shared workflow’s Codecov step previously resolved ${{ secrets.CODECOV_TOKEN }} separately, which can leave the upload token empty. Use secrets: inherit or a supported declared secret input, then verify a private-repository run completes the upload.

Proposed fix
-    secrets:
-      script-env-secret-1-key: CODECOV_TOKEN
-      script-env-secret-1-value: ${{ secrets.CODECOV_TOKEN }}
+    secrets: inherit
🤖 Prompt for 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.

In @.github/workflows/pr.yaml around lines 419 - 421, Update the reusable
workflow invocation in pr.yaml so CODECOV_TOKEN is passed through to the shared
workflow’s Codecov upload step, using secrets inheritance or the workflow’s
supported declared secret input instead of relying only on
script-env-secret-1-key/script-env-secret-1-value. Preserve the existing test
script environment mapping as needed, and verify a private-repository run
completes the Codecov upload.

@ramakrishnap-nv

Copy link
Copy Markdown
Collaborator Author

/merge

@rapids-bot
rapids-bot Bot merged commit 37a7b63 into main Jul 17, 2026
178 of 181 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants