Skip to content

ci: capture coverage before pytest imports - #3358

Open
rluo8 wants to merge 2 commits into
NVIDIA:mainfrom
rluo8:fix/coverage-early-start
Open

rluo8 wants to merge 2 commits into
NVIDIA:mainfrom
rluo8:fix/coverage-early-start

Conversation

@rluo8

@rluo8 rluo8 commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Description

Coverage CI misses cuda.core initialization executed while pytest parses warning filters, before pytest-cov starts tracing.

Run pytest through coverage run on Linux and Windows so tracing starts before pytest imports. Preserve accumulated data with --append and use dynamic_context = test_function for function-level attribution.

@copy-pr-bot

copy-pr-bot Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@github-actions github-actions Bot added the CI/CD CI/CD infrastructure label Nov 4, 2026
@rluo8

rluo8 commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Signed-off-by: Rui Luo <ruluo@nvidia.com>
@rluo8
rluo8 force-pushed the fix/coverage-early-start branch from bdd8eb8 to c86cdbd Compare November 4, 2026 08:41
@rluo8
rluo8 marked this pull request as ready for review November 4, 2026 09:11
@rluo8 rluo8 self-assigned this Nov 4, 2026
@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Explain Change →

Summary

Summary by CodeRabbit

  • Chores
    • Updated coverage test runs on Linux and Windows to use shared coverage settings, including per-test context tracking.
    • Windows bindings tests now run through the same coverage workflow as the other package tests.

The coverage configuration now enables test-function contexts. Linux and Windows workflow steps run the package test suites through coverage run, append coverage data, and disable pytest-cov options.

Changes: Coverage execution

Layer / File(s) Summary
Configure and run coverage
.coveragerc, .github/workflows/coverage.yml
The coverage configuration enables test-function contexts. Linux and Windows test steps invoke pytest through coverage run and append coverage data. The cuda.core steps include comments about starting tracing before helper imports.

Suggested reviewers: mdboom, rwgk

Change: Bug fix

Merge Risk: Low · up to ddfc2

Coverage remains available, but identifying which tests exercised fixtures or parameterized cases becomes harder. This is a bounded follow-up risk.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@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

Review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 4010017 and ddfc213.

Files selected for processing: 2
  • .coveragerc
  • .github/workflows/coverage.yml

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

Comment thread .coveragerc Resolved
@rluo8
rluo8 requested review from jpascucci-nv and mdboom November 4, 2026 12:38
@rluo8 rluo8 added this to the cuda.core 1.3.0 milestone Nov 4, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/CD CI/CD infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant