Skip to content

Commit d1ef2eb

Browse files
committed
fix(coverage): fixed rustflags needed by tarpaulin
1 parent 79b9998 commit d1ef2eb

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

.github/workflows/coverage.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
uses: dtolnay/rust-toolchain@stable
1212

1313
- name: Cache dependencies
14-
uses: actions/cache@v3
14+
uses: actions/cache@v4
1515
with:
1616
path: |
1717
~/.cargo/bin/
@@ -41,11 +41,17 @@ jobs:
4141
- name: Install cargo-tarpaulin
4242
run: cargo install cargo-tarpaulin --version 0.26.0
4343

44+
- name: Set Python interpreter for pyo3
45+
run: echo "PYTHON_SYS_EXECUTABLE=$(which python3)" >> $GITHUB_ENV
46+
4447
- name: Run tests and generate coverage report
45-
run: cargo tarpaulin --all-features --workspace --out Xml --output-dir ./coverage --ignore-tests
48+
run: |
49+
export RUSTFLAGS=$(python3-config --ldflags)
50+
cargo tarpaulin --all-features --out Xml --output-dir ./coverage
4651
4752
- name: Upload coverage to Codecov
48-
uses: codecov/codecov-action@v3
53+
uses: codecov/codecov-action@v5
4954
with:
55+
token: ${{ secrets.CODECOV_TOKEN }}
5056
files: ./coverage/cobertura.xml
5157
fail_ci_if_error: true

0 commit comments

Comments
 (0)