Skip to content

Commit a4a00ab

Browse files
committed
ci: Ignore coverage data from subprojects and generated files
We only care about our own source files, so anything in `subprojects` or the `build` directory can be ignored, thus fixing the bugginess with Harfbuzz headers.
1 parent faba21f commit a4a00ab

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/tests.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -397,13 +397,14 @@ jobs:
397397
if [[ "${{ runner.os }}" != 'macOS' ]]; then
398398
LCOV_IGNORE_ERRORS=',' # do not ignore any lcov errors by default
399399
if [[ "${{ matrix.os }}" = ubuntu-24.04 ]]; then
400-
# filter mismatch and unused-entity errors detected by lcov 2.x
401-
LCOV_IGNORE_ERRORS='mismatch,unused'
400+
# filter mismatch errors detected by lcov 2.x
401+
LCOV_IGNORE_ERRORS='mismatch'
402402
fi
403403
lcov --rc lcov_branch_coverage=1 --ignore-errors $LCOV_IGNORE_ERRORS \
404-
--capture --directory . --output-file coverage.info
404+
--capture --directory . --exclude $PWD/subprojects --exclude $PWD/build \
405+
--output-file coverage.info
405406
lcov --rc lcov_branch_coverage=1 --ignore-errors $LCOV_IGNORE_ERRORS \
406-
--output-file coverage.info --extract coverage.info $PWD/src/'*' $PWD/lib/'*'
407+
--output-file coverage.info --extract coverage.info $PWD/src/'*'
407408
lcov --rc lcov_branch_coverage=1 --ignore-errors $LCOV_IGNORE_ERRORS \
408409
--list coverage.info
409410
find . -name '*.gc*' -delete

0 commit comments

Comments
 (0)