File tree Expand file tree Collapse file tree 2 files changed +47
-59
lines changed
Expand file tree Collapse file tree 2 files changed +47
-59
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -209,3 +209,50 @@ jobs:
209209 cargo test --all-features --target x86_64-unknown-linux-gnu
210210 env :
211211 RUSTFLAGS : " -Z sanitizer=leak"
212+
213+ coverage :
214+ runs-on : ubuntu-24.04
215+ if : github.event.pull_request.draft == false
216+
217+ steps :
218+ - uses : actions/checkout@v4
219+ with :
220+ submodules : true
221+ run : |
222+ tools/install-sys-dependencies-linux
223+
224+ - name : Install stable
225+ uses : dtolnay/rust-toolchain@stable
226+ with :
227+ components : llvm-tools-preview
228+
229+ - name : cargo install cargo-llvm-cov
230+ uses : taiki-e/install-action@cargo-llvm-cov
231+
232+ - name : cargo generate-lockfile
233+ if : hashFiles('Cargo.lock') == ''
234+ run : |
235+ cd rust
236+ cargo generate-lockfile
237+
238+ - name : Run tests
239+ run : |
240+ tools/rust-coverage
241+
242+ - name : Run Doc tests
243+ run : |
244+ tools/rust-test doc
245+
246+ - name : Record Rust version
247+ run : echo "RUST=$(rustc --version)" >> "$GITHUB_ENV"
248+
249+ - name : Upload to codecov.io
250+ uses : codecov/codecov-action@v5
251+ with :
252+ fail_ci_if_error : true
253+ token : ${{ secrets.CODECOV_TOKEN }}
254+ env_vars : OS,RUST
255+
256+ - name : Gather and check Rust code coverage
257+ run : |
258+ tools/check-coverage rust/coverage.stats rust/lcov.info
You can’t perform that action at this time.
0 commit comments