podal/justfile

30 lines
718 B
Makefile
Raw Normal View History

coverage-init:
cargo install grcov
rustup component add llvm-tools
test-in-docker:
docker run --rm -v $PWD:/app/ git.kemitix.net/kemitix/rust:latest cargo test
shell-in-docker:
docker run --rm -it -v $PWD:/app/ git.kemitix.net/kemitix/rust:latest bash
coverage:
#!/usr/bin/env bash
set -e
rm -rf ./target
just clean
export RUSTFLAGS="-Zinstrument-coverage" LLVM_PROFILE_FILE="just-%p-%m.profraw"
cargo +nightly build
cargo +nightly test
just generate
just server
generate:
grcov . --binary-path ./target/debug/ -s . -t html --branch --ignore-not-existing --ignore "./target/" -o ./coverage/
server:
cd ./coverage && python3 -m http.server 8001
clean:
rm -rf ./*.prof* ./coverage/