Skip to content

Commit

Permalink
Skip codecov and deploy on CI workflows in fork repos (#834)
Browse files Browse the repository at this point in the history
With #796, our CI workflow can now be run on forks of the repo. I'm currently doing development in a fork victorlin/augur, including for this PR, and CI workflows have been failing due to covtest upload failure albeit passing tests.

This PR adds an extra condition on running the codecov upload and deploy step, only under the context of the main GitHub repository.
  • Loading branch information
victorlin authored Jan 27, 2022
1 parent 174b404 commit 22bda3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ jobs:
- run: pytest -c pytest.python3.ini --cov-report=xml --cov=augur
- run: cram --shell=/bin/bash tests/functional/*.t tests/builds/*.t
- run: bash tests/builds/runner.sh
- if: matrix.python-version == 3.8
- if: github.repository == 'nextstrain/augur' && matrix.python-version == 3.8
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
deploy:
if: ${{ github.ref == 'refs/heads/release' }}
if: github.repository == 'nextstrain/augur' && github.ref == 'refs/heads/release'
needs: [test]
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit 22bda3f

Please sign in to comment.