Skip to content

Commit 58bdf61

Browse files
committed
fix(cd): Attempt to include Python bindings in coverage report
1 parent baeb25f commit 58bdf61

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

.github/workflows/coverage.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,21 +48,23 @@ jobs:
4848
# Set the path for the raw coverage data
4949
export LLVM_PROFILE_FILE="target/coverage/simstring_rs-%p-%m.profraw"
5050
# Run all tests, including the ignored python bindings
51-
cargo test --all-features -- --include-ignored
52-
# Generate the coverage report
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
51+
cargo test --all-features
5552
# Generate Python coverage report
5653
pip install uv
5754
uv venv
5855
source .venv/bin/activate
5956
uv pip install maturin pytest coverage
6057
rm -rf target/wheels
61-
maturin build --release
58+
# Build in debug mode for coverage mapping
59+
maturin build
6260
uv pip install target/wheels/*.whl
6361
coverage run -m pytest tests/python/ -vv
6462
coverage xml -o coverage/python-coverage.xml
6563
64+
# Generate the coverage report
65+
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
66+
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
67+
6668
- name: Upload coverage to Codecov
6769
uses: codecov/codecov-action@v5
6870
with:

0 commit comments

Comments
 (0)