Skip to content

Commit

Permalink
Use separate CI job for Codecov upload for MPI workflow (#1366)
Browse files Browse the repository at this point in the history
* Update versions

* Use separate job for Codecov upload
  • Loading branch information
lbianchi-lbl authored Apr 23, 2024
1 parent 9c31b35 commit b22f995
Showing 1 changed file with 29 additions and 12 deletions.
41 changes: 29 additions & 12 deletions .github/workflows/mpi4py-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8]
python-version: ['3.10']
os:
- linux
- win64
# - macos
include:
- os: linux
os-version: ubuntu-20.04
os-version: ubuntu-22.04
- os: win64
os-version: windows-2019
os-version: windows-2022
# - os: macos
# os-version: macos-10.15

Expand All @@ -69,13 +69,30 @@ jobs:
coverage combine
# convert to XML
coverage xml
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v4
- name: Upload coverage report as job artifact
uses: actions/upload-artifact@v4
with:
fail_ci_if_error: true
verbose: true
# NOTE: secrets are not available for pull_request workflows
# However, as of 2024-02-10, Codecov is still allowing tokenless upload from PRs
# but does require token for other workflows e.g. merge to `main`
# see https://github.com/codecov/codecov-action/issues/1274#issuecomment-1934437359
token: ${{ secrets.CODECOV_TOKEN }}
name: coverage-report-${{ matrix.os }}
path: coverage.xml
if-no-files-found: error

upload-coverage:
name: Upload coverage report (Codecov)
needs: [build]
runs-on: ubuntu-latest
steps:
# the checkout step is needed to have access to codecov.yml
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
pattern: coverage-report-*
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
verbose: true
# NOTE: secrets are not available for pull_request workflows
# However, as of 2024-02-10, Codecov is still allowing tokenless upload from PRs
# but does require token for other workflows e.g. merge to `main`
# see https://github.com/codecov/codecov-action/issues/1274#issuecomment-1934437359
token: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit b22f995

Please sign in to comment.