Skip to content

Commit

Permalink
Backport PR #2865: TST: Upload to codecov as separate job (#2866)
Browse files Browse the repository at this point in the history
Co-authored-by: P. L. Lim <[email protected]>
  • Loading branch information
meeseeksmachine and pllim authored May 9, 2024
1 parent 7b5de14 commit 11c6193
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions .github/workflows/ci_workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,30 @@ jobs:
run: python -m pip install --upgrade pip tox
- name: Test/run with tox
run: tox -e ${{ matrix.toxenv }} -- ${{ matrix.toxposargs }}
- name: Upload coverage to codecov
- name: Upload coverage to artifacts
if: "contains(matrix.toxenv, '-cov')"
uses: actions/upload-artifact@v4
with:
name: coverage_${{ matrix.toxenv }}.xml
path: coverage.xml
if-no-files-found: error

upload-codecov:
needs: [ ci_tests ]
permissions:
contents: none
runs-on: ubuntu-latest
name: Upload Coverage
steps:
- name: Download coverage artifacts
uses: actions/download-artifact@v4
with:
path: coverage
pattern: coverage_*
merge-multiple: true
- name: Upload report to Codecov
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
directory: coverage
fail_ci_if_error: true
verbose: true

0 comments on commit 11c6193

Please sign in to comment.