From 4286a87407fe9fd98d4fd5ecca38c2edc1a556c1 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Tue, 6 Apr 2021 15:12:19 +0000 Subject: [PATCH] Build/Test Tools: Prevent PHPUnit tests on `push` for forks/private mirrors. The reorganization of the PHPUnit workflow in [50441] unintentionally caused the tests to be run for every `push` event, even for forks and private mirrors. Previously, the second job required the first one to pass, and the conditional check on the first prevented both from running. Because the first job is no longer required for the second, both jobs must have the appropriate conditional check. Fixes #52983. git-svn-id: https://develop.svn.wordpress.org/trunk@50670 602fd350-edb4-49c9-b593-d223f7449a82 --- .github/workflows/phpunit-tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/phpunit-tests.yml b/.github/workflows/phpunit-tests.yml index 9573e8ea26..24835b5b46 100644 --- a/.github/workflows/phpunit-tests.yml +++ b/.github/workflows/phpunit-tests.yml @@ -70,6 +70,7 @@ jobs: test-php: name: ${{ matrix.php }}${{ matrix.multisite && ' multisite' || '' }}${{ matrix.split_slow && ' slow tests' || '' }} ${{ matrix.memcached && ' with memcached' || '' }} on ${{ matrix.os }} runs-on: ${{ matrix.os }} + if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} strategy: fail-fast: false matrix: