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 14
14
15
15
jobs :
16
16
coverage :
17
- runs-on : ubuntu-20.04
17
+ runs-on : ubuntu-latest
18
18
19
19
steps :
20
20
- uses : actions/checkout@v4
21
21
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
33
26
34
27
- name : install uv
35
28
uses : astral-sh/setup-uv@v6
39
32
40
33
- run : rustc --version --verbose
41
34
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
43
39
env:
44
40
RUST_BACKTRACE: 1
45
41
RUSTFLAGS: '-C instrument-coverage'
51
47
- run : ls -lha
52
48
- run : uv run coverage xml
53
49
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
55
53
56
54
- uses : codecov/codecov-action@v5
55
+ with :
56
+ files : codecov.json
57
57
58
58
# See https://github.com/PyO3/pyo3/discussions/2781
59
59
# 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