Skip to content

Commit

Permalink
Merge pull request #3232 from dopplershift/codecov-jobs
Browse files Browse the repository at this point in the history
Move codecov upload to a separate job
  • Loading branch information
dcamron authored Oct 17, 2023
2 parents 85669e2 + e301c6b commit e149219
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 7 deletions.
4 changes: 0 additions & 4 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
codecov:
notify:
after_n_builds: 9

coverage:
status:
patch:
Expand Down
8 changes: 5 additions & 3 deletions .github/actions/run-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
17 changes: 17 additions & 0 deletions .github/workflows/tests-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
17 changes: 17 additions & 0 deletions .github/workflows/tests-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

0 comments on commit e149219

Please sign in to comment.