Closed tzemanovic closed 8 months ago
cargo llvm-cov works with our codebase, we could use that. It can export the coverage in lcov format which can then be used with IDE plugins like like Coverage Gutters for VS Code, or uploaded to a service like codecov.io.
Proof of concept - https://app.codecov.io/gh/james-chf/namada-fork/tree/james-chf%2Fcoveralls is the coverage for main
generated after running the following command (which also requires cargo-nextest ):
cargo llvm-cov nextest \
--lcov --output-path .hack/lcov.info --features namada/testing -E "not test(e2e)"
@james-chf @juped can we integrate automatic coverage?
I see we already run coverage in CI and publish it as an artifact - https://github.com/anoma/namada/blob/076e0162047091d9c19051ed05fb3c74363d14e3/.github/workflows/build-and-test-bridge.yml#L225-L235
We could probably upload the coverage file as well to a service like https://codecov.io or https://coveralls.io, to get a nice UI for browsing code coverage (there is also some GitHub integrations we could look at e.g. bots that comment on PRs w.r.t. how they increase (or decrease) test coverage)
Closed by #2148
this can run in the CI