File tree Expand file tree Collapse file tree 2 files changed +15
-5
lines changed
Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -10,20 +10,20 @@ jobs:
1010 runs-on : ubuntu-latest
1111 steps :
1212 - uses : actions/checkout@v1
13- - name : Build program
14- run : cargo build
1513 - name : Check formatting
1614 run : cargo fmt --all -- --check
1715 - name : Check README.md synchronization
1816 run : |
1917 cargo install --force cargo-sync-readme
2018 cargo sync-readme -c
21- - name : Execute tests
22- run : cargo test
2319 - name : Scan code
2420 run : |
2521 rustup component add clippy
2622 cargo clippy --all-targets --all-features -- -D warnings
23+ - name : Execute tests
24+ run : cargo test
25+ - name : Build program
26+ run : cargo build
2727
2828 tag :
2929 if : github.ref == 'refs/heads/master'
Original file line number Diff line number Diff line change 1- .PHONY : init update-version clean build test scan release
1+ .PHONY : init update-version clean build test cover open-coverage-html scan release
22
33init :
44 rm -rf .git/hooks
@@ -20,6 +20,16 @@ build:
2020test :
2121 cargo test
2222
23+ cover-flags := CARGO_INCREMENTAL=0 RUSTFLAGS="-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off"
24+ cover :
25+ $(cover-flags ) cargo +nightly build
26+ $(cover-flags ) cargo +nightly test
27+ grcov ./target/debug/ -s . -t lcov --llvm --ignore-not-existing -o ./target/debug/coverage
28+ genhtml -o ./target/debug/coverage-html --show-details --highlight ./target/debug/coverage
29+
30+ open-coverage-html :
31+ open ./target/debug/coverage-html/index.html
32+
2333scan :
2434 cargo clippy --all-targets --all-features -- -D warnings
2535
You can’t perform that action at this time.
0 commit comments