From edfc8f419671315b4b5afb50174409788f5955b6 Mon Sep 17 00:00:00 2001 From: Pierre Marchand Date: Thu, 8 Aug 2024 22:31:02 +0200 Subject: [PATCH] try two different jobs --- .github/workflows/CI.yml | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 242ee5fa..015de213 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -189,15 +189,35 @@ jobs: run: | cd htool/ lcov --capture --base-directory ./ --directory build/ --output-file coverage.info - lcov --remove coverage.info '/usr/*' '*/hpddm/*' --output-file coverage.info - apt-get update - apt-get install -y --no-install-recommends gpg gpg-agent + lcov --remove coverage.info '/usr/*' '*/hpddm/*' --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@v4.5.0 + + # - name: Upload coverage to Codecov + # if: matrix.CODE_COVERAGE == 'ON' + # uses: codecov/codecov-action@v4.5.0 + # with: + # fail_ci_if_error: true + # files: htool/coverage.info + # token: ${{ secrets.CODECOV_TOKEN }} + # verbose: true + + 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: - fail_ci_if_error: true - files: htool/coverage.info + file: ./coverage.info token: ${{ secrets.CODECOV_TOKEN }} verbose: true