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