Skip to content

Commit

Permalink
Don't try to upload code coverage report if CODECOV_TOKEN secret is a…
Browse files Browse the repository at this point in the history
…bsent
  • Loading branch information
mathroc committed Oct 3, 2024
1 parent 039de17 commit b0dab0e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,13 @@ jobs:
run: vendor/bin/phpunit

- name: Send coverage report to Codecov
if: ${{ success() && matrix.coverage == true }}
if: ${{ success() && matrix.coverage == true && env.token != '' }}
uses: codecov/codecov-action@v3
with:
files: ./build/logs/clover.xml
fail_ci_if_error: true
verbose: true
# see https://github.com/codecov/codecov-action/issues/557
token: ${{ secrets.CODECOV_TOKEN }}
env:
token: ${{secrets.TESTKEY1}}

0 comments on commit b0dab0e

Please sign in to comment.