Conversation
Co-authored-by: arrayka <1551741+arrayka@users.noreply.github.com>
Co-authored-by: arrayka <1551741+arrayka@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #729 +/- ##
=======================================
Coverage 89.01% 89.01%
=======================================
Files 428 428
Lines 78294 78294
=======================================
+ Hits 69692 69697 +5
+ Misses 8602 8597 -5
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR adds miri-specific code coverage calculation to the CI workflow to track test coverage for unsafe code paths conditionally compiled with #[cfg(miri)]. The implementation runs cargo llvm-cov with the miri configuration flag and uploads the results to Codecov as a separate flag for tracking.
Changes:
- Added a new "Generate miri code coverage" step in the coverage job that runs tests with
--cfg mirienabled - Split Codecov uploads into two separate steps with distinct flags:
unittestsfor regular coverage andmirifor miri-specific coverage - Used
--config 'build.rustflags=[...]'approach to preserve llvm-cov's instrumentation flags while adding the miri cfg
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Thanks for this - quick question: can you help me understand the actionable part of this pipeline? There is not an automated rejection (as far as I can tell), which would be hard to measure in any case as raw coverage is not useful in this context. New tests still require review. Is the intent to make that manual review process easier by generating the coverage report? Of is the purpose of this PR to develop some early feedback on how this pipeline would interact with pull-requests? If the latter, it might not be a bad idea to annotate the stage as such in the YAML file so we don't accidentally forget about it 😄. |
|
Thanks! |

Adds coverage calculation for code paths conditionally compiled with
#[cfg(miri)]. Codecov will now report coverage for both regular unit tests and miri-gated code.Let's check it in to main to verify whether codecov flags work as expected.
Changes
.github/workflows/ci.ymlcoverage jobcargo llvm-cov nextestwith--config 'build.rustflags=["-Dwarnings", "--cfg", "miri"]'lcov_miri.info(regular coverage remains inlcov.info)files: lcov.info,lcov_miri.infoImplementation note
Uses
--config 'build.rustflags=[...]'instead ofRUSTFLAGSenvironment variable to preserve llvm-cov's instrumentation flags.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.