Skip to content

Commit

Permalink
Support empty CODECOV_TOKEN
Browse files Browse the repository at this point in the history
We'd still like to trigger this step if the CODECOV_TOKEN was specified
but is empty, as would be the case if a PR is made from a fork.
  • Loading branch information
cottsay committed Jun 24, 2024
1 parent b807fbe commit 229ccc7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ jobs:
needs: [setup]
strategy: ${{ fromJson(needs.setup.outputs.strategy) }}
runs-on: ${{ matrix.os }}
env:
HAVE_CODECOV_TOKEN: ${{ contains(toJson(secrets), 'CODECOV_TOKEN') }}

steps:
- uses: actions/checkout@v4
Expand All @@ -66,4 +68,4 @@ jobs:
- uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
if: ${{ env.CODECOV_TOKEN != '' }}
if: ${{ env.HAVE_CODECOV_TOKEN == 'true' }}

0 comments on commit 229ccc7

Please sign in to comment.