Skip to content

Commit b4969d4

Browse files
committed
Build/Test Tools: Remove repository specific logic from callable workflows.
Because reusable workflows could be called from any other repository in a variety of contexts, repository specific `if` conditions should not be present. Instead, this logic should be included in the calling workflows only. Props johnbillion. See #62221. git-svn-id: https://develop.svn.wordpress.org/trunk@59507 602fd350-edb4-49c9-b593-d223f7449a82
1 parent e2b0bfd commit b4969d4

File tree

4 files changed

+4
-7
lines changed

4 files changed

+4
-7
lines changed

.github/workflows/performance.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
uses: WordPress/wordpress-develop/.github/workflows/reusable-performance.yml@trunk
3737
permissions:
3838
contents: read
39-
if: ${{ ( github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' ) && ! contains( github.event.before, '00000000' ) }}
39+
if: ${{ ( github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' ) }}
4040
strategy:
4141
fail-fast: false
4242
matrix:

.github/workflows/reusable-performance.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ jobs:
102102
runs-on: ubuntu-latest
103103
permissions:
104104
contents: read
105-
if: ${{ ( github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' ) && ! contains( github.event.before, '00000000' ) }}
105+
if: ${{ ! contains( github.event.before, '00000000' ) }}
106106

107107
steps:
108108
- name: Configure environment variables

.github/workflows/reusable-phpunit-tests-v3.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,15 +226,15 @@ jobs:
226226
run: git diff --exit-code
227227

228228
- name: Checkout the WordPress Test Reporter
229-
if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/trunk' && inputs.report }}
229+
if: ${{ github.ref == 'refs/heads/trunk' && inputs.report }}
230230
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
231231
with:
232232
repository: 'WordPress/phpunit-test-runner'
233233
path: 'test-runner'
234234
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
235235

236236
- name: Submit test results to the WordPress.org host test results
237-
if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/trunk' && inputs.report }}
237+
if: ${{ github.ref == 'refs/heads/trunk' && inputs.report }}
238238
env:
239239
WPT_REPORT_API_KEY: "${{ secrets.WPT_REPORT_API_KEY }}"
240240
run: docker compose run --rm -e WPT_REPORT_API_KEY -e WPT_PREPARE_DIR=/var/www -e WPT_TEST_DIR=/var/www php php test-runner/report.php

.github/workflows/reusable-support-json-reader-v1.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ jobs:
3737
major-wp-version:
3838
name: Determine major WordPress version
3939
runs-on: ubuntu-latest
40-
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
4140
timeout-minutes: 5
4241
outputs:
4342
version: ${{ steps.major-wp-version.outputs.version }}
@@ -69,7 +68,6 @@ jobs:
6968
php-versions:
7069
name: Determine PHP versions
7170
runs-on: ubuntu-latest
72-
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
7371
needs: [ major-wp-version ]
7472
timeout-minutes: 5
7573
outputs:
@@ -102,7 +100,6 @@ jobs:
102100
mysql-versions:
103101
name: Determine MySQL versions
104102
runs-on: ubuntu-latest
105-
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
106103
needs: [ major-wp-version ]
107104
timeout-minutes: 5
108105
outputs:

0 commit comments

Comments
 (0)