From fa40817efbbb7555c55210562e3304933a607c5e Mon Sep 17 00:00:00 2001 From: Hugo Date: Wed, 20 Nov 2019 19:22:38 +0200 Subject: [PATCH] GHA: Install lcov on macOS to report coverage --- .github/workflows/test.yml | 1 + .travis/after_success.sh | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 163250248..06caa4316 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 }} diff --git a/.travis/after_success.sh b/.travis/after_success.sh index 721a469b6..badf04484 100755 --- a/.travis/after_success.sh +++ b/.travis/after_success.sh @@ -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