chore: add grcov-coverage as an alternate report generation recipe
All checks were successful
Rust / build (push) Successful in 1m56s
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful

This commit is contained in:
Paul Campbell 2024-06-04 07:16:23 +01:00
parent e29c274aaf
commit d67b821130

View file

@ -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"