File tree Expand file tree Collapse file tree 1 file changed +14
-14
lines changed Expand file tree Collapse file tree 1 file changed +14
-14
lines changed Original file line number Diff line number Diff line change 1414
1515jobs :
1616 coverage :
17- runs-on : ubuntu-20.04
17+ runs-on : ubuntu-latest
1818
1919 steps :
2020 - uses : actions/checkout@v4
2121
22- - name : install rust nightly
23- uses : dtolnay/rust-toolchain@nightly
24-
25- - id : cache-rust
26- name : cache rust
27- uses : Swatinem/rust-cache@v2
28-
29- - run : cargo install rustfilt coverage-prepare
30- if : steps.cache-rust.outputs.cache-hit != 'true'
31-
32- - run : rustup component add llvm-tools-preview
22+ # rust-nightly used for `#[coverage(off)]`
23+ - uses : dtolnay/rust-toolchain@nightly
24+ - uses : Swatinem/rust-cache@v2
25+ - uses : taiki-e/install-action@cargo-llvm-cov
3326
3427 - name : install uv
3528 uses : astral-sh/setup-uv@v6
3932
4033 - run : rustc --version --verbose
4134
42- - run : make build-dev
35+ - run : |
36+ source <(cargo llvm-cov show-env --export-prefix)
37+ cargo llvm-cov clean --workspace --profraw-only
38+ make build-dev
4339 env:
4440 RUST_BACKTRACE: 1
4541 RUSTFLAGS: '-C instrument-coverage'
5147 - run : ls -lha
5248 - run : uv run coverage xml
5349
54- - run : coverage-prepare lcov python/pydantic_core/*.so
50+ - run : |
51+ source <(cargo llvm-cov show-env --export-prefix)
52+ cargo llvm-cov --codecov --output-path=codecov.json
5553
5654 - uses : codecov/codecov-action@v5
55+ with :
56+ files : codecov.json
5757
5858 # See https://github.com/PyO3/pyo3/discussions/2781
5959 # tests intermittently segfault with pypy and cpython 3.7 when using `coverage run ...`, hence separate job
You can’t perform that action at this time.
0 commit comments