From 2b2304693caf2b2e2b06d24cc1e1718e3d43fa0c Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Mon, 3 May 2021 19:18:15 +0200 Subject: [PATCH] Stop trying to upload the coverage if there is no auth token This fixes build failures on pull requests from forks (where usually no authentication token for the code coverage is set). Also fix the name of the coverage upload step to contain the corect name of the service. --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e922f7f1..4e267a0e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,9 +72,9 @@ jobs: - name: Run Tests run: ./vendor/bin/phpunit --coverage-clover build/coverage/xml - - name: Upload coverage results to Coveralls - if: "${{ matrix.coverage != 'none' }}" + - name: Upload coverage results to Codacy env: CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} + if: "${{ matrix.coverage != 'none' && env.CODACY_PROJECT_TOKEN != '' }}" run: | ./vendor/bin/codacycoverage clover build/coverage/xml