From b0dab0ed1e52448033555fc6781d30bc645d2aea Mon Sep 17 00:00:00 2001 From: Mathieu Rochette Date: Thu, 3 Oct 2024 15:57:22 +0200 Subject: [PATCH] Don't try to upload code coverage report if CODECOV_TOKEN secret is absent --- .github/workflows/tests.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index cf4c7120a8..80701d44b2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -168,7 +168,7 @@ 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 @@ -176,3 +176,5 @@ jobs: verbose: true # see https://github.com/codecov/codecov-action/issues/557 token: ${{ secrets.CODECOV_TOKEN }} + env: + token: ${{secrets.TESTKEY1}}