@@ -105,49 +105,23 @@ jobs:
105
105
106
106
- name : Install `rust` toolchain
107
107
run : |
108
- ## Install `rust` toolchain
109
108
rustup toolchain install nightly --no-self-update -c rustfmt --profile minimal
110
109
rustup default nightly
111
110
112
- - name : " `grcov` ~ install"
113
- run : cargo install grcov
114
-
115
- - name : cargo test
116
- run : |
117
- cargo test --all --no-fail-fast ${{ matrix.cargo_flags }}
118
- env :
119
- CARGO_INCREMENTAL : " 0"
120
- RUSTFLAGS : " -Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort -Cdebug-assertions=off"
121
- RUSTDOCFLAGS : " -Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort -Cdebug-assertions=off"
111
+ - name : Install cargo-llvm-cov
112
+ uses : taiki-e/install-action@cargo-llvm-cov
113
+ - name : Generate code coverage
114
+ run : cargo llvm-cov --all-features --lcov --branch --output-path lcov.info
122
115
123
- - name : Generate coverage data
124
- id : grcov
125
- run : |
126
- grcov target/debug/ \
127
- --branch \
128
- --llvm \
129
- --source-dir . \
130
- --output-path lcov.info \
131
- --ignore-not-existing \
132
- --excl-line "#\\[derive\\(" \
133
- --excl-br-line "#\\[derive\\(" \
134
- --excl-start "#\\[cfg\\(test\\)\\]" \
135
- --excl-br-start "#\\[cfg\\(test\\)\\]" \
136
- --commit-sha ${{ github.sha }} \
137
- --service-job-id ${{ github.job }} \
138
- --service-name "GitHub Actions" \
139
- --service-number ${{ github.run_id }}
140
116
- name : Upload coverage as artifact
141
117
uses : actions/upload-artifact@v4
142
118
with :
143
119
name : lcov.info
144
- # path: ${{ steps.grcov.outputs.report }}
145
120
path : lcov.info
146
121
147
122
- name : Upload coverage to codecov.io
148
123
uses : codecov/codecov-action@v4
149
124
with :
150
125
token : ${{ secrets.CODECOV_TOKEN }}
151
- # file: ${{ steps.grcov.outputs.report }}
152
126
file : lcov.info
153
127
fail_ci_if_error : true
0 commit comments