-
Notifications
You must be signed in to change notification settings - Fork 39
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
Add code coverage to CI with Coveralls integration #385
Conversation
Upgrade github checkout and rust-cache actions to latest versions and add names to each step where missing. Also move rust-cache step to happen after the toolchain is installed, as recommended by https://github.com/Swatinem/rust-cache?tab=readme-ov-file#example-usage.
actions-rs is no longer maintained and rust-bitcoin is using dtolnay/rust-toolchain in their CI.
Following rust-bitcoin's example, run code coverage in CI with cargo llvm-cov and upload the results to Coveralls.
bd94b57
to
9766e39
Compare
Coverage report for this PR can be found here: https://coveralls.io/jobs/155930549. |
It may be useful to enable coveralls PR comments if we feel comfortable with giving their bot write access to the repo. FWIW rust-bitcoin does this. |
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.
The only thing this seems to be missing is the edit of the README to say
- Coverage measurement
Did you check that cache hits are occurring as expected with this new form? I must admit I have never checked before.
I did and they do! You can see that it restores the cache in the "Use Cache" step and that the dependencies are fresh instead of re-downloaded/re-compiled: https://github.com/payjoin/rust-payjoin/actions/runs/11791047279/job/32842477162?pr=385. |
This brings the github actions up-to-date with latest versions and adds more descriptive names to the workflow steps.
It also swaps the ordering of
rust-cache
and the rust toolchain installation steps so that cache actually works.Finally, a new CI step adds code coverage measurements using
cargo-llvm
and uploads the results to Coveralls.