From 22bda3fd52463396ebbcd373b02d6d457960b919 Mon Sep 17 00:00:00 2001 From: Victor Lin <13424970+victorlin@users.noreply.github.com> Date: Thu, 27 Jan 2022 15:04:37 -0800 Subject: [PATCH] Skip codecov and deploy on CI workflows in fork repos (#834) 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. --- .github/workflows/ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index af0acf53a..69960d700 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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: