LeoniePhiline / quote-of-the-week

This week in Rust Quote of the Week scraper
Creative Commons Zero v1.0 Universal
3 stars 0 forks source link

Code coverage overview - visualize covered & uncovered lines #2

Open LeoniePhiline opened 7 months ago

LeoniePhiline commented 7 months ago

Maybe CodeCov free tier - or is that just another capitalist mouse trap?

barafael commented 7 months ago

Probably mouse trap! Why not just tarpaulin html output?

LeoniePhiline commented 7 months ago

Thanks a lot for chiming in! :) Very welcome!

Why not just tarpaulin ...

I'm using cargo-llvm-cov because of its support for nextest. (See also https://github.com/xd009642/tarpaulin/issues/992)

I've made good experiences with LLVM coverage, making it my default.

... html output?

cargo llvm-cov nextest --html is easily produced, but difficult to integrate. Which is making it only suitable for local testing, as HTML reports would need to be manually downloaded as CI artifacts and inspected.

I'd want this integrated in PRs. At least automated PR comments reporting uncovered lines. I am used to GitLab's great coverage integration based on Cobertura XML. (Edit: In combination with coverage ratio reports.)

I imagine that should be possible in GitHub, too, but I haven't investigated yet.

Upon a quick look, https://github.com/marketplace/actions/cobertura-report only appears to provide PR comments. What I'd like to see is coverage visualization in the diff - see GitLab link above.

The GitHub solutions aren't tightly integrated enough for my taste. The diff annotations are clunky and annoying:

The llvm-cov HTML report per git ref could be published to GitHub pages, maybe. But I'd prefer to keep my efforts of reinventing the wheel to a minimum. :)

LeoniePhiline commented 7 months ago

https://github.com/marketplace/actions/coverage-diff seems useful. Also https://github.com/marketplace/actions/code-coverage-report-difference.

Hm. There's already lots of reinvented wheels out there. I've "just" got to review them all, and their trustworthiness, and their feature sets and sigh ;)

LeoniePhiline commented 7 months ago

I always thought GitHub was the "better" platform. Working on #9 taught me GitLab is really preferable. These actions on the marketplace are just as trashy as the rest of the JS/TS ecosystem. 😞