File tree 1 file changed +6
-16
lines changed
1 file changed +6
-16
lines changed Original file line number Diff line number Diff line change @@ -162,37 +162,27 @@ jobs:
162
162
- name : Setup Rust cache
163
163
uses : Swatinem/rust-cache@v2
164
164
165
+ - name : Install cargo-llvm-cov
166
+ uses : taiki-e/install-action@cargo-llvm-cov
167
+
165
168
- name : Setup OPA
166
169
uses : open-policy-agent/setup-opa@v2
167
170
with :
168
171
version : latest
169
172
170
- - name : Download grcov
171
- run : |
172
- mkdir -p "${HOME}/.local/bin"
173
- curl -sL https://github.com/mozilla/grcov/releases/download/v0.8.13/grcov-x86_64-unknown-linux-gnu.tar.bz2 | tar jxf - -C "${HOME}/.local/bin"
174
- echo "$HOME/.local/bin" >> $GITHUB_PATH
175
-
176
173
- name : Build OPA bundles for test
177
174
run : make build-opa
178
175
179
176
- name : Run test suite with profiling enabled
180
177
run : |
181
- cargo test --all-features --no-fail-fast --tests
182
- env :
183
- RUSTFLAGS : " -Cinstrument-coverage"
184
- LLVM_PROFILE_FILE : " cargo-test-%p-%m.profraw"
185
-
186
- - name : Build grcov report
187
- run : |
188
- mkdir -p target/coverage
189
- grcov . --binary-path ./target/debug/deps/ -s . -t lcov --branch --ignore-not-existing --ignore '../*' --ignore "/*" -o target/coverage/tests.lcov
178
+ cargo llvm-cov --all-features --no-fail-fast --tests --codecov --output-path codecov.json
190
179
191
180
- name : Upload to codecov.io
192
181
uses : codecov/codecov-action@v5
193
182
with :
194
- files : target/coverage/*.lcov
183
+ files : codecov.json
195
184
token : ${{ secrets.CODECOV_TOKEN }}
185
+ fail_ci_if_error : true
196
186
197
187
tests-done :
198
188
name : Tests done
You can’t perform that action at this time.
0 commit comments