File tree Expand file tree Collapse file tree 1 file changed +6
-16
lines changed Expand file tree Collapse file tree 1 file changed +6
-16
lines changed Original file line number Diff line number Diff line change @@ -162,37 +162,27 @@ jobs:
162162 - name : Setup Rust cache
163163 uses : Swatinem/rust-cache@v2
164164
165+ - name : Install cargo-llvm-cov
166+ uses : taiki-e/install-action@cargo-llvm-cov
167+
165168 - name : Setup OPA
166169 uses : open-policy-agent/setup-opa@v2
167170 with :
168171 version : latest
169172
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-
176173 - name : Build OPA bundles for test
177174 run : make build-opa
178175
179176 - name : Run test suite with profiling enabled
180177 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
190179
191180 - name : Upload to codecov.io
192181 uses : codecov/codecov-action@v5
193182 with :
194- files : target/coverage/*.lcov
183+ files : codecov.json
195184 token : ${{ secrets.CODECOV_TOKEN }}
185+ fail_ci_if_error : true
196186
197187 tests-done :
198188 name : Tests done
You can’t perform that action at this time.
0 commit comments