Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 25, 2025

Adds code coverage collection to PR CI workflow using stable Rust's source-based coverage (available since 1.60.0). Coverage reports are uploaded to Codecov on every PR.

Implementation

  • New codecov job in .github/workflows/ci.yaml runs Rust test coverage only
  • Uses cargo-llvm-cov with stable toolchain and rust-cache
  • Set fail_ci_if_error: false to avoid blocking PRs on Codecov service issues
  • 30-minute timeout, respects skip:ci label

Design

The PR job collects only Rust test coverage to minimize build time impact. The existing scheduled cron job continues to provide comprehensive coverage including Python snippets and full test suite.

Original prompt

This section details on the original issue you should resolve

<issue_title>Add code coverage report to CI</issue_title>
<issue_description>https://blog.rust-lang.org/2022/04/07/Rust-1.60.0.html#source-based-code-coverage</issue_description>

Comments on the Issue (you are @copilot in this section)

@coolreader18 Yeah I saw that; that's exciting! @youknowone I was forgetting we had one in cron. Can we make report using codecov? https://about.codecov.io/language/rust/ @youknowone #3649 made the first report: https://app.codecov.io/gh/RustPython/RustPython @youknowone I looked at it and I like it. If it doesn't increase build time that much (because now we can do it with stable compiler), adding it to PR CI will be the final step.

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 25, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


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

Copilot AI changed the title [WIP] Add code coverage report to CI Add code coverage reporting to PR CI Dec 25, 2025
Copilot AI requested a review from youknowone December 25, 2025 10:24
@youknowone youknowone force-pushed the copilot/add-code-coverage-report branch 2 times, most recently from 13e285a to ef0acb1 Compare December 27, 2025 16:44
Instead of setting RUSTFLAGS via GITHUB_ENV (which has quoting issues
on Windows), use step-level env to set RUSTFLAGS per platform.

- Add LLVM_PROFILE_FILE and CARGO_LLVM_COV to job-level env
- Remove complex show-env parsing for GITHUB_ENV
- Set RUSTFLAGS directly in each platform's build step
- Windows includes /STACK:8000000 link arg

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@youknowone youknowone force-pushed the copilot/add-code-coverage-report branch from ef0acb1 to c2b5586 Compare December 27, 2025 16:55
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.

Add code coverage report to CI

2 participants