GHA: Install lcov on macOS to report coverage

This commit is contained in:
Hugo 2019-11-20 19:22:38 +02:00
parent f90a21965a
commit fa40817efb
2 changed files with 7 additions and 1 deletions

View File

@ -71,5 +71,6 @@ jobs:
run: |
.travis/after_success.sh
env:
MATRIX_OS: ${{ matrix.os }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}

View File

@ -1,7 +1,12 @@
#!/bin/bash
# gather the coverage data
sudo apt-get -qq install lcov
if [[ "$MATRIX_OS" == "macOS-latest" ]]; then
brew install lcov
else
sudo apt-get -qq install lcov
fi
lcov --capture --directory . -b . --output-file coverage.info
# filter to remove system headers
lcov --remove coverage.info '/usr/*' -o coverage.filtered.info