From 948d7ed68b145f44745c07f1822b9e656115c964 Mon Sep 17 00:00:00 2001 From: Pierre Marchand Date: Fri, 9 Aug 2024 12:08:15 +0200 Subject: [PATCH] fix coverage --- .github/workflows/CI.yml | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index b93923b..56c3bce 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -165,10 +165,27 @@ jobs: if: matrix.CODE_COVERAGE == 'ON' run: | lcov --ignore-errors mismatch --capture --base-directory ./ --directory build/ --output-file coverage.info - lcov --remove coverage.info '/usr/*' '*/hpddm/*' '*/pybind11/*' '*/lib/htool/*' --output-file coverage.info + lcov --remove coverage.info '/usr/*' '*/hpddm/*' '*/pybind11/*' '*/lib/htool/*' --output-file ../coverage.info - - name: Upload coverage to Codecov + - uses: actions/upload-artifact@v4 + with: + path: coverage.info + if-no-files-found: error if: matrix.CODE_COVERAGE == 'ON' - uses: codecov/codecov-action@v2 + + coverage: + runs-on: ubuntu-latest + if: ${{ success() }} + needs: [ linux ] + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/download-artifact@v4 + - name: Upload coverage report + uses: codecov/codecov-action@v4 with: - file: coverage.info + fail_ci_if_error: true + file: ./coverage.info + token: ${{ secrets.CODECOV_TOKEN }} + verbose: true