-
Notifications
You must be signed in to change notification settings - Fork 79
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
chore: add code coverage report #120
Conversation
I still want to improve it a bit, but I thought I push a first version of it. |
Codecov Report
@@ Coverage Diff @@
## master #120 +/- ##
=========================================
Coverage ? 83.95%
=========================================
Files ? 87
Lines ? 18091
Branches ? 0
=========================================
Hits ? 15189
Misses ? 2902
Partials ? 0 |
Generate a code coverage report and add it as artifact as well as uploading it to CodeCov. The coverage instrumentation needs at least Rust 1.60, hence the rust-toolchain was updated to that version.
@ZenGround0 @galargh Things work! I'm quite happy with the outcome. The report is uploaded to Codecov and also an artifact is created, in case someone wants the fancy llvm report. I think it would be OK to merge it as it is, though things I'd love to see improved (though I'm not sure if those are possible/worth it:
|
I'd expect #120 (comment) to link to codecov. I'll try to look into why the links lead to nowehere.
This should be a lot easier once github/roadmap#470 is implemented. |
Hello! I may be missing something, but have you considered using the simplistic tarpaulin solution like we've done in Forest? We are pretty happy with the codecov reports generated there, and the workflow seems more maintainable. Is it missing some crucial features? |
@LesnyRumcajs last time I've uses Tarpaulin, the results were different, while Tarpaulin was wrong. I don't know if that has changed. |
@vmx Do you recall what kind of difference have you observed? Is there an issue with that in the Tarpaulin repository? |
I can't recall. I think easiest is to just try it out in this repo and see if the output is different. |
@LesnyRumcajs I just tried to compare the output with the one from Tarpaulin. But I can't get Tarpaulin working, when running |
@vmx Thanks for checking this out! Do you know why this flag breaks the compilation? |
Sounds to me like some library is already compiled with dead code removal, hence the symbols are not there anymore. But linker issues are always tricky and huge time sink. Though in case someone wants to take a look, it's easy to reproduce via |
@vmx Interesting, thanks for the insights!
Indeed, there be dragons. :) |
I figured out why #120 (comment) doesn't contain the correct links to the reports. This happens because we run the workflow on
In such a setup, the checkout action only checks out this branch and does not rebase it on the PR target - To address this we could switch the workflow trigger to |
@vmx I've only skimmed the convo above, but is this something you think is ready to land, or could be soon? |
It was ready from my end (see #120 (comment)), when I handed it over to @galargh. |
I case someone is looking into this, https://github.com/taiki-e/cargo-llvm-cov also looks quite promising (I haven't used it yet, though). |
It's been waiting for input on the above suggestion. Now, it's been implemented in #510 so I think there are no outstanding issues with it. Someone just has to resolve the conflicts - there's nothing complicated to resolve, it's just that I don't have write access to this repository. |
Thanks, I've resolved conflicts. I would prefer much of this were in the Makefile so it was easy for a dev to replicate, but I'll approve this and we can improve later. |
@galargh CI failed, something about GH_TOKEN |
Co-authored-by: Piotr Galar <[email protected]>
Generate a code coverage report and add it as artifact as well as uploading it to CodeCov. Co-authored-by: raulk <[email protected]> Co-authored-by: Piotr Galar <[email protected]> Co-authored-by: Alex <[email protected]>
Generate a code coverage report and add it as artifact as well as uploading it to CodeCov. Co-authored-by: raulk <[email protected]> Co-authored-by: Piotr Galar <[email protected]> Co-authored-by: Alex <[email protected]>
Generate a code coverage report and add it as artifact as well as uploading it to CodeCov. Co-authored-by: raulk <[email protected]> Co-authored-by: Piotr Galar <[email protected]> Co-authored-by: Alex <[email protected]>
Generate a code coverage report and add it as artifact as well as
uploading it to CodeCov.