diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9d63ab64b..257b9852e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -162,7 +162,7 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} - coverage: ${{ matrix.coverage && 'xdebug' || 'none' }} + coverage: ${{ matrix.coverage && github.repository == 'PHPMailer/PHPMailer' && 'xdebug' || 'none' }} ini-values: sendmail_path=/usr/sbin/sendmail -t -i, error_reporting=E_ALL, display_errors=On extensions: ${{ steps.set_extensions.outputs.EXT }} @@ -207,15 +207,15 @@ jobs: sudo cp test/fakesendmail.sh /usr/sbin/sendmail - name: Run tests, no code coverage - if: ${{ matrix.coverage == false }} + if: ${{ matrix.coverage == false || github.repository != 'PHPMailer/PHPMailer' }} run: ./vendor/bin/phpunit --no-coverage - name: Run tests with code coverage - if: ${{ matrix.coverage == true }} + if: ${{ matrix.coverage == true && github.repository == 'PHPMailer/PHPMailer' }} run: vendor/bin/phpunit - name: Send coverage report to Codecov - if: ${{ success() && matrix.coverage == true }} + if: ${{ success() && matrix.coverage == true && github.repository == 'PHPMailer/PHPMailer' }} uses: codecov/codecov-action@v4 env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}