diff --git a/.github/workflows/test-php.yml b/.github/workflows/test-php.yml index c748531..7d79694 100644 --- a/.github/workflows/test-php.yml +++ b/.github/workflows/test-php.yml @@ -52,10 +52,13 @@ jobs: - name: Upload coverage report to Codecov uses: codecov/codecov-action@v4 + if: ${{ env.CODECOV_TOKEN != '' }} with: files: ./cobertura.xml fail_ci_if_error: true token: ${{ secrets.CODECOV_TOKEN }} + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} # yamllint disable-line #;< PHP_PHAR build-php: diff --git a/.github/workflows/test-scaffold.yml b/.github/workflows/test-scaffold.yml index b1129e6..1f00fb9 100644 --- a/.github/workflows/test-scaffold.yml +++ b/.github/workflows/test-scaffold.yml @@ -53,7 +53,10 @@ jobs: - name: Upload coverage report to Codecov uses: codecov/codecov-action@v4 + if: ${{ env.CODECOV_TOKEN != '' }} with: directory: ./.scaffold-coverage-html fail_ci_if_error: true token: ${{ secrets.CODECOV_TOKEN }} + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/test-shell.yml b/.github/workflows/test-shell.yml index 78bf8c9..e36778a 100644 --- a/.github/workflows/test-shell.yml +++ b/.github/workflows/test-shell.yml @@ -67,13 +67,15 @@ jobs: path: ./.coverage-html if-no-files-found: error - - name: Upload coverage reports to Codecov - if: matrix.os == 'ubuntu-latest' + - name: Upload coverage report to Codecov uses: codecov/codecov-action@v4 + if: ${{ env.CODECOV_TOKEN != '' && matrix.os == 'ubuntu-latest' }} with: directory: ./.coverage-html fail_ci_if_error: true token: ${{ secrets.CODECOV_TOKEN }} + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - name: Run Tests on other OSes if: matrix.os != 'ubuntu-latest'