Skip to content

Commit 06d8f34

Browse files
committed
chore(ci): testing codecov separation of python bindings
1 parent e95d072 commit 06d8f34

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

.github/workflows/coverage.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,22 @@ jobs:
5050
# Run all tests, including the ignored python bindings
5151
cargo test --all-features -- --include-ignored
5252
# Generate the coverage report
53-
grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore "tests/*" --ignore "examples/*" --ignore "build.rs" -o ./coverage.lcov
54-
grcov . --binary-path ./target/debug/ -s . -t cobertura --branch --ignore-not-existing --ignore "tests/*" --ignore "examples/*" --ignore "build.rs" -o ./coverage/cobertura.xml
53+
grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore "tests/*" --ignore "examples/*" --ignore "build.rs" --ignore "src/lib.rs" -o ./coverage.lcov
54+
grcov . --binary-path ./target/debug/ -s . -t cobertura --branch --ignore-not-existing --ignore "tests/*" --ignore "examples/*" --ignore "build.rs" --ignore "src/lib.rs" -o ./coverage/cobertura.xml
55+
# Generate Python coverage report
56+
pip install uv
57+
uv venv
58+
source .venv/bin/activate
59+
uv pip install maturin pytest coverage
60+
rm -rf target/wheels
61+
maturin build --release
62+
uv pip install target/wheels/*.whl
63+
coverage run -m pytest tests/python/ -vv
64+
coverage xml -o coverage/python-coverage.xml
5565
5666
- name: Upload coverage to Codecov
5767
uses: codecov/codecov-action@v5
5868
with:
5969
token: ${{ secrets.CODECOV_TOKEN }}
60-
files: ./coverage/cobertura.xml
70+
files: ./coverage/cobertura.xml,./coverage/python-coverage.xml
6171
fail_ci_if_error: true

0 commit comments

Comments
 (0)