Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use separate CI job for Codecov upload for MPI workflow #1366

Merged
merged 2 commits into from
Apr 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}