mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-18 20:46:21 +00:00
ci: fix coverage lcov exclude pattern
The code is built in /usr/src/profanity/ inside Docker, so excluding '/usr/*' removes all source files! Fix: exclude only system headers/libs (/usr/include/*, /usr/lib/*), not the entire /usr/ tree. Also add --ignore-errors empty to handle edge cases.
This commit is contained in:
5
.github/workflows/ci-code.yml
vendored
5
.github/workflows/ci-code.yml
vendored
@@ -113,7 +113,10 @@ jobs:
|
||||
make -j$(nproc)
|
||||
make check || true
|
||||
lcov --capture --directory . --output-file /coverage/coverage.info --ignore-errors inconsistent
|
||||
lcov --remove /coverage/coverage.info "/usr/*" "*/tests/*" --output-file /coverage/coverage.info --ignore-errors inconsistent
|
||||
lcov --remove /coverage/coverage.info \
|
||||
"/usr/include/*" "/usr/lib/*" "*/tests/*" \
|
||||
--output-file /coverage/coverage.info \
|
||||
--ignore-errors inconsistent,empty
|
||||
'
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v4
|
||||
|
||||
Reference in New Issue
Block a user