File tree Expand file tree Collapse file tree 1 file changed +6
-17
lines changed Expand file tree Collapse file tree 1 file changed +6
-17
lines changed Original file line number Diff line number Diff line change @@ -28,29 +28,18 @@ jobs:
28
28
29
29
coverage :
30
30
runs-on : ubuntu-latest
31
- env :
32
- RUSTC_BOOTSTRAP : 1
33
31
steps :
34
32
- uses : actions/checkout@v4
35
33
- name : Install dependencies
36
34
run : sudo apt-get install libdbus-1-dev
37
- - name : Install grcov
38
- run : curl -L https://github.com/mozilla/grcov/releases/download/v0.8.13/grcov-x86_64-unknown-linux-gnu.tar.bz2 | tar -jxf -
39
- - name : Install llvm-tools
40
- run : rustup component add llvm-tools-preview
41
- - name : Build for coverage
42
- run : cargo build --all-features
43
- env :
44
- RUSTFLAGS : " -Zinstrument-coverage"
35
+ - name : Install cargo-llvm-cov
36
+ uses : taiki-e/install-action@v2
37
+ with :
38
+ tool : cargo-llvm-cov
45
39
- name : Run tests with coverage
46
- run : cargo test --all-features
47
- env :
48
- RUSTFLAGS : " -Zinstrument-coverage"
49
- LLVM_PROFILE_FILE : " test-coverage-%p-%m.profraw"
50
- - name : Convert coverage
51
- run : ./grcov . -s . --binary-path target/debug/ -t lcov --branch --ignore-not-existing -o target/debug/lcov.info
40
+ run : cargo llvm-cov test --all-features --codecov --output-path codecov-report.json
52
41
- name : Upload coverage to codecov.io
53
42
uses : codecov/codecov-action@v3
54
43
with :
55
- directory : ./target/debug
44
+ files : codecov-report.json
56
45
fail_ci_if_error : true
You can’t perform that action at this time.
0 commit comments