Skip to content

Commit dc3aea9

Browse files
committed
Fix coverage
1 parent 36bb157 commit dc3aea9

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

.github/workflows/coverage.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ jobs:
9393
mkdir -p coverage
9494
lcov --directory . --capture --output-file coverage/coverage.info --ignore-errors ${IGNORE_ERRORS}
9595
lcov -r coverage/coverage.info \
96+
"*/pybind11/*" \
9697
"*/thirdparty/*" \
9798
"*/build/*" \
9899
"*/tests/*" \

python/setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ def generate_coverage(self, cwd):
156156
log.info("generating coverage files")
157157

158158
self.spawn([sys.executable, "-m", "pytest", "-s", os.path.join(cwd, "tests")])
159+
self.spawn(["lcov", "--directory", cwd, "--capture", "--output-file", "coverage/coverage.info",
160+
"--ignore-errors", "mismatch,gcov,source,negative,unused,empty,format,corrupt"])
159161

160162
if not os.path.isdir("/host"): # We are not running in cibuildwheel container
161163
return

0 commit comments

Comments
 (0)