Skip to content

Commit d8cb465

Browse files
committed
Moves coverage to rust ci
1 parent b63985b commit d8cb465

File tree

2 files changed

+47
-59
lines changed

2 files changed

+47
-59
lines changed

.github/workflows/codecov.yml

Lines changed: 0 additions & 59 deletions
This file was deleted.

.github/workflows/rust.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)