Add code coverage to CI with Coveralls integration#385
Add code coverage to CI with Coveralls integration#385spacebear21 merged 5 commits intopayjoin:masterfrom
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. |
DanGould
left a comment
There was a problem hiding this comment.
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-cacheand the rust toolchain installation steps so that cache actually works.Finally, a new CI step adds code coverage measurements using
cargo-llvmand uploads the results to Coveralls.