File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -16,15 +16,27 @@ jobs:
16
16
- uses : actions-rs/toolchain@v1
17
17
with :
18
18
toolchain : stable
19
+ target : x86_64-unknown-linux-musl
19
20
override : true
21
+ components : llvm-tools-preview
22
+ - name : Download grcov
23
+ run : |
24
+ mkdir -p "${HOME}/.local/bin"
25
+ curl -sL https://github.com/mozilla/grcov/releases/download/v0.8.10/grcov-x86_64-unknown-linux-gnu.tar.bz2 | tar jxf - -C "${HOME}/.local/bin"
26
+ echo "$HOME/.local/bin" >> $GITHUB_PATH
20
27
- uses : actions-rs/cargo@v1
21
28
name : cargo update
22
29
with :
23
30
command : update
24
- - uses : actions-rs/cargo@v1
25
- name : cargo test
31
+ - name : cargo test
32
+ run : |
33
+ CARGO_INCREMENTAL=0 RUSTFLAGS='-Cinstrument-coverage' LLVM_PROFILE_FILE='cargo-test-%p-%m.profraw' cargo test
34
+ grcov . --binary-path ./target/debug/deps/ -s . -t lcov --branch --ignore-not-existing --ignore '../*' --ignore "/*" -o target/coverage/tests.lcov
35
+ - name : Check test coverage
36
+ uses : terencetcf/github-actions-lcov-minimum-coverage-checker@v1
26
37
with :
27
- command : test
38
+ coverage-file : ./target/coverage/tests.lcov
39
+ minimum-coverage : 90
28
40
29
41
publish_to_crates_io :
30
42
name : " Publish to crates.io"
You can’t perform that action at this time.
0 commit comments