Skip to content

Commit 955f87d

Browse files
authored
Merge pull request #165 from Brain-WP/feature/ghactions-fix-coverage-vs-forks
GH Actions: allow test runs to succeed on fork
2 parents 4fb8231 + 9b12156 commit 955f87d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/php-qa.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,16 @@ jobs:
6565
run: ./vendor/bin/phpunit --migrate-configuration
6666

6767
- name: Run unit tests (without code coverage)
68-
if: ${{ matrix.php-versions != '7.4' || matrix.dependency-versions != 'highest' }}
68+
if: ${{ matrix.php-versions != '7.4' || matrix.dependency-versions != 'highest' || github.event.repository.fork == true }}
6969
run: ./vendor/bin/phpunit
7070

7171
- name: Run unit tests with code coverage
72-
if: ${{ matrix.php-versions == '7.4' && matrix.dependency-versions == 'highest' }}
72+
if: ${{ matrix.php-versions == '7.4' && matrix.dependency-versions == 'highest' && github.event.repository.fork == false }}
7373
run: ./vendor/bin/phpunit --coverage-clover=coverage.xml
7474

7575
- name: Update codecov.io
7676
uses: codecov/codecov-action@v5
77-
if: ${{ matrix.php-versions == '7.4' && matrix.dependency-versions == 'highest' }} # upload coverage once is enough
77+
if: ${{ matrix.php-versions == '7.4' && matrix.dependency-versions == 'highest' && github.event.repository.fork == false }} # upload coverage once is enough
7878
env:
7979
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
8080
with:

0 commit comments

Comments
 (0)