File tree 1 file changed +16
-17
lines changed
1 file changed +16
-17
lines changed Original file line number Diff line number Diff line change @@ -2,16 +2,15 @@ name: Rust codecov
2
2
3
3
on :
4
4
push :
5
- branches : [ "master" ]
5
+ branches : [ '*' ] # Run on all branches
6
6
pull_request :
7
- branches : [ "master" ]
7
+ branches : [ '*' ] # Run on PRs to all branches
8
8
9
9
env :
10
10
CARGO_TERM_COLOR : always
11
11
12
12
jobs :
13
13
build :
14
-
15
14
runs-on : ubuntu-latest
16
15
17
16
steps :
@@ -20,27 +19,27 @@ jobs:
20
19
with :
21
20
toolchain : nightly
22
21
override : true
22
+ components : llvm-tools-preview # Required for grcov
23
+
23
24
- name : Build
24
25
run : cargo build --verbose
26
+
25
27
- name : Run tests
26
28
run : cargo test --verbose --no-fail-fast
27
29
env :
28
30
CARGO_INCREMENTAL : ' 0'
29
31
RUSTFLAGS : ' -Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
30
32
RUSTDOCFLAGS : ' -Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
31
- - name : rust-grcov
32
- # You may pin to the exact commit or the version.
33
- # uses: actions-rs/grcov@bb47b1ed7883a1502fa6875d562727ace2511248
34
- uses :
actions-rs/[email protected]
35
- with :
36
- config : .github/config/grcov.yml
37
- - name : Codecov
38
- # You may pin to the exact commit or the version.
39
- # uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378
40
-
33
+
34
+ - name : Run grcov
35
+ run : |
36
+ cargo install grcov
37
+ grcov . -s . --binary-path ./target/debug/ -t lcov --branch --ignore-not-existing --ignore "/*" -o lcov.info
38
+
39
+ - name : Upload coverage to Codecov
40
+ uses : codecov/codecov-action@v3
41
41
with :
42
- # Repository upload token - get it from codecov.io. Required only for private repositories
43
42
token : ${{ secrets.CODECOV_TOKEN }}
44
- # Specify whether the Codecov output should be verbose
45
- verbose : true
46
- fail_ci_if_error : true
43
+ files : lcov.info
44
+ fail_ci_if_error : true
45
+ verbose : true
You can’t perform that action at this time.
0 commit comments