diff --git a/.codecov.yml b/.codecov.yml index db01d813986..c3c24e637d1 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -1,7 +1,3 @@ -codecov: - notify: - after_n_builds: 9 - coverage: status: patch: diff --git a/.github/actions/run-tests/action.yml b/.github/actions/run-tests/action.yml index ead48b1736e..88c831fb77b 100644 --- a/.github/actions/run-tests/action.yml +++ b/.github/actions/run-tests/action.yml @@ -45,8 +45,10 @@ runs: name: ${{ inputs.key }}-images path: test_output/ - - name: Upload coverage - if: ${{ always() && inputs.upload-coverage == 'true' }} - uses: codecov/codecov-action@v3 + - name: Upload coverage artifact + if: ${{ inputs.upload-coverage == 'true' }} + uses: actions/upload-artifact@v3 with: name: ${{ inputs.key }} + path: coverage.xml + retention-days: 7 diff --git a/.github/workflows/tests-conda.yml b/.github/workflows/tests-conda.yml index d118d8725b2..781521a0a15 100644 --- a/.github/workflows/tests-conda.yml +++ b/.github/workflows/tests-conda.yml @@ -49,3 +49,20 @@ jobs: with: run-doctests: ${{ runner.os != 'Windows' }} key: conda-${{ matrix.python-version }}-${{ runner.os }} + + codecov: + name: CodeCov Upload + needs: CondaTests + runs-on: ubuntu-latest + timeout-minutes: 2 + steps: + - name: Checkout source + uses: actions/checkout@v4 + + - name: Download coverage artifacts + uses: actions/download-artifact@v3 + + - name: Upload coverage + uses: codecov/codecov-action@v3 + with: + name: ${{ github.workflow }} diff --git a/.github/workflows/tests-pypi.yml b/.github/workflows/tests-pypi.yml index 876fe5cabcb..e7a34129182 100644 --- a/.github/workflows/tests-pypi.yml +++ b/.github/workflows/tests-pypi.yml @@ -75,3 +75,20 @@ jobs: with: run-doctests: ${{ matrix.dep-versions == 'requirements.txt' && matrix.no-extras != 'No Extras' }} key: pypi-${{ matrix.python-version }}-${{ matrix.dep-versions }}-${{ matrix.no-extras }}-${{ runner.os }} + + codecov: + needs: PyPITests + name: CodeCov Upload + runs-on: ubuntu-latest + timeout-minutes: 2 + steps: + - name: Checkout source + uses: actions/checkout@v4 + + - name: Download coverage artifacts + uses: actions/download-artifact@v3 + + - name: Upload coverage + uses: codecov/codecov-action@v3 + with: + name: ${{ github.workflow }}