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

Split codecov into separate job, combine coverage of all matrix jobs #968

Merged
merged 1 commit into from
Jun 15, 2022
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
34 changes: 28 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ jobs:
defaults:
run:
shell: bash -l {0}
env:
COVERAGE_FILE: ${{ github.workspace }}/.coverage@python=${{ matrix.python-version }},biopython=${{ matrix.biopython-version || 'latest' }}
COVERAGE_RCFILE: ${{ github.workspace }}/.coveragerc
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
Expand All @@ -46,11 +49,30 @@ jobs:
- run: cram --shell=/bin/bash tests/
env:
AUGUR: coverage run -a ${{ github.workspace }}/bin/augur
COVERAGE_FILE: ${{ github.workspace }}/.coverage
COVERAGE_RCFILE: ${{ github.workspace }}/.coveragerc
- run: coverage xml
- run: bash tests/builds/runner.sh
- if: github.repository == 'nextstrain/augur' && matrix.python-version == '3.10' && matrix.biopython-version == ''
uses: codecov/codecov-action@v2
- uses: actions/upload-artifact@v3
with:
fail_ci_if_error: true
name: coverage
path: "${{ env.COVERAGE_FILE }}"

codecov:
if: github.repository == 'nextstrain/augur'
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: '3.10'
- run: pip install coverage

- uses: actions/download-artifact@v3
with:
name: coverage

- run: coverage combine .coverage@*
- run: coverage xml

- uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true