File tree 1 file changed +46
-0
lines changed
1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change 27
27
clippy_flags : --all-targets -- -D warnings
28
28
reporter : github-pr-review
29
29
30
+ code-coverage :
31
+
32
+ runs-on : ubuntu-latest
33
+
34
+ steps :
35
+ - uses : actions/checkout@v3
36
+
37
+ - name : Install Rust stable
38
+ uses : dtolnay/rust-toolchain@stable
39
+ with :
40
+ toolchain : stable
41
+
42
+ - name : Install grcov
43
+ env :
44
+ GRCOV_LINK : https://github.com/mozilla/grcov/releases/download
45
+ GRCOV_VERSION : v0.8.13
46
+ run : |
47
+ curl -L "$GRCOV_LINK/$GRCOV_VERSION/grcov-x86_64-unknown-linux-musl.tar.bz2" |
48
+ tar xj -C $HOME/.cargo/bin
49
+
50
+ - name : Install llvm-tools-preview
51
+ run : |
52
+ rustup component add llvm-tools-preview
53
+
54
+ # Not necessary on a newly created image, but strictly advised
55
+ - name : Run cargo clean
56
+ run : |
57
+ cargo clean
58
+
59
+ - name : Run tests
60
+ env :
61
+ RUSTFLAGS : " -Cinstrument-coverage"
62
+ LLVM_PROFILE_FILE : " matroska-%p-%m.profraw"
63
+ run : |
64
+ cargo test --all-features --verbose
65
+
66
+ - name : Get coverage data for codecov
67
+ run : |
68
+ grcov . --binary-path ./target/debug/ -s . -t lcov --branch \
69
+ --ignore-not-existing --ignore "/*" --ignore "../*" -o lcov.info
70
+
71
+ - name : Codecov upload
72
+ uses : codecov/codecov-action@v3
73
+ with :
74
+ files : lcov.info
75
+
30
76
tests :
31
77
strategy :
32
78
matrix :
You can’t perform that action at this time.
0 commit comments