Skip to content

Commit 0981035

Browse files
author
Heiko Alexander Weber
committed
pipeline changes
1 parent 68d7129 commit 0981035

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

.github/workflows/pipeline.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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'

Makefile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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

33
init:
44
rm -rf .git/hooks
@@ -20,6 +20,16 @@ build:
2020
test:
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+
2333
scan:
2434
cargo clippy --all-targets --all-features -- -D warnings
2535

0 commit comments

Comments
 (0)