-
Notifications
You must be signed in to change notification settings - Fork 86
Add support for code coverage #790
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds code coverage support to the egglog project by integrating cargo-llvm-cov for local coverage generation and Codecov for CI-based coverage reporting and tracking.
Changes:
- Added Codecov badge to README and comprehensive documentation for generating coverage reports locally
- Created new
coverageanddoctestMakefile targets to support coverage generation - Integrated coverage reporting into CI workflow with automatic uploads to Codecov
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| README.md | Added Codecov badge, new Code Coverage section with local setup instructions, reorganized Parallelism section, and improved consistency by capitalizing "CodSpeed" |
| Makefile | Added coverage target using cargo-llvm-cov, extracted doctest as separate target, updated .PHONY declarations |
| .gitignore | Added lcov.info to ignore list for generated coverage reports |
| .github/workflows/build.yml | Updated test job to install cargo-llvm-cov, run coverage generation, and upload results to Codecov |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
CodSpeed Performance ReportMerging this PR will not alter performanceComparing Summary
Footnotes
|
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. Thanks for integrating Codecov - We've got you covered ☂️ |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This PR adds support for running the tests locally to produce code coverage and in CI uploading to Codecov.
This should allow us to see for each PR how it affects the overall code coverage and what added lines are covered by tests/examples. I have been finding myself wanting this, as I develop new features to make sure I covered all the cases with examples.
I don't suggest we require 100% coverage for new lines added. However, even just seeing the lines can help you understand if your tests are covering what you think they are and possibly encourage covering more lines.
It can also help see what parts of our code base are not used in any examples.