diff --git a/justfile b/justfile index 4441466..661f703 100644 --- a/justfile +++ b/justfile @@ -21,3 +21,17 @@ start-ngrok: coverage-update: cargo tarpaulin --lib --out html echo "Now:\n\topen tarpaulin-report.html" + +grcov-coverage: + #!/usr/bin/env bash + set -e + # an alternate coverage report + rustup component add llvm-tools-preview + export RUSTFLAGS="-Cinstrument-coverage" + cargo build + export LLVM_PROFILE_FILE="git-next-%p-%m.profraw" + cargo test + echo "Building report..." + grcov . -s . --binary-path ./target/debug/ -t html --branch --ignore-not-existing -o ./target/debug/coverage/ + find . -name '*.profraw' -exec rm "{}" \; + echo "Now:\n\topen target/debug/coverage/index.html"