/ci-testing

repo used to test ci design

Primary LanguageRust

Rust Coverage Testing Example

This is an example of how to use the cargo-llvm-cov tool to generate coverage reports for a Rust project.

Setup

cargo install cargo-binstall

We need to use nightly Rust to run the tests and generate the coverage report.

rustup install nightly

Once you have binstall installed, you can install the other tools with the following command:

cargo binstall -y cargo-nextest cargo-llvm-cov cargo-mutants just cargo-insta

Running the tests

just test

Updating the snapshot

cargo insta review

See the coverage report in your browser

just coverage