Skip to content

Commit 9f378b1

Browse files
committed
Run the full test suite on organization forks.
1 parent 6cdc7f7 commit 9f378b1

3 files changed

Lines changed: 23 additions & 17 deletions

File tree

.github/workflows/phpunit-tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
permissions:
6464
contents: read
6565
secrets: inherit
66-
if: ${{ github.repository == 'WordPress/wordpress-develop' }}
66+
if: ${{ startsWith( github.repository, 'WordPress/' ) && ( github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) ) }}
6767
strategy:
6868
fail-fast: false
6969
matrix:
@@ -140,7 +140,7 @@ jobs:
140140
permissions:
141141
contents: read
142142
secrets: inherit
143-
if: ${{ github.repository == 'WordPress/wordpress-develop' }}
143+
if: ${{ startsWith( github.repository, 'WordPress/' ) && ( github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) ) }}
144144
strategy:
145145
fail-fast: false
146146
matrix:
@@ -190,7 +190,7 @@ jobs:
190190
permissions:
191191
contents: read
192192
secrets: inherit
193-
if: ${{ github.repository == 'WordPress/wordpress-develop' }}
193+
if: ${{ startsWith( github.repository, 'WordPress/' ) && ( github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) ) }}
194194
strategy:
195195
fail-fast: false
196196
matrix:
@@ -235,7 +235,7 @@ jobs:
235235
permissions:
236236
contents: read
237237
secrets: inherit
238-
if: ${{ github.repository == 'WordPress/wordpress-develop' }}
238+
if: ${{ startsWith( github.repository, 'WordPress/' ) && ( github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) ) }}
239239
strategy:
240240
fail-fast: false
241241
matrix:
@@ -262,7 +262,7 @@ jobs:
262262
permissions:
263263
contents: read
264264
secrets: inherit
265-
if: ${{ github.repository != 'WordPress/wordpress-develop' && github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' }}
265+
if: ${{ ! startsWith( github.repository, 'WordPress/' ) && github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' }}
266266
strategy:
267267
fail-fast: false
268268
matrix:

.github/workflows/test-build-processes.yml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ concurrency:
4545
permissions: {}
4646

4747
jobs:
48-
# Tests the WordPress Core build process on multiple operating systems.
48+
# Tests the WordPress Core build process.
4949
test-core-build-process:
5050
name: Core running from ${{ matrix.directory }}
5151
uses: ./.github/workflows/reusable-test-core-build-process.yml
@@ -55,28 +55,31 @@ jobs:
5555
strategy:
5656
fail-fast: false
5757
matrix:
58+
os: [ 'ubuntu-24.04' ]
5859
directory: [ 'src', 'build' ]
5960
include:
6061
# Only prepare artifacts for Playground once.
61-
- directory: 'build'
62+
- os: 'ubuntu-24.04'
63+
directory: 'build'
6264
save-build: true
6365
prepare-playground: ${{ github.event_name == 'pull_request' && true || '' }}
6466
with:
65-
os: 'ubuntu-24.04'
67+
os: ${{ matrix.os }}
6668
directory: ${{ matrix.directory }}
6769
save-build: ${{ matrix.save-build && matrix.save-build || false }}
6870
prepare-playground: ${{ matrix.prepare-playground && matrix.prepare-playground || false }}
6971

7072
# Tests the WordPress Core build process on additional operating systems.
7173
#
7274
# This is separate from the job above in order to use stricter conditions when determining when to test additional
73-
# operating systems. This avoids unintentionally consuming excessive minutes, as Windows-based jobs consume minutes at
74-
# a 2x rate, and MacOS-based jobs at a 10x rate.
75+
# operating systems. This avoids unintentionally consuming excessive minutes. Windows-based jobs consume minutes at a
76+
# 2x rate, and MacOS-based jobs at a 10x rate.
77+
# See https://docs.github.com/en/billing/concepts/product-billing/github-actions#per-minute-rates.
7578
#
7679
# The `matrix` and `runner` contexts are not available for use within `if` expressions. So there is
7780
# currently no way to determine the OS being used on a given job.
7881
# See https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability.
79-
test-core-build-process-extended:
82+
test-core-build-process-additional-os:
8083
name: Core running from ${{ matrix.directory }}
8184
uses: ./.github/workflows/reusable-test-core-build-process.yml
8285
permissions:
@@ -91,7 +94,7 @@ jobs:
9194
os: ${{ matrix.os }}
9295
directory: ${{ matrix.directory }}
9396

94-
# Tests the Gutenberg plugin build process on multiple operating systems when run within a wordpress-develop checkout.
97+
# Tests the Gutenberg plugin build process within a wordpress-develop checkout.
9598
test-gutenberg-build-process:
9699
name: Gutenberg running from ${{ matrix.directory }}
97100
uses: ./.github/workflows/reusable-test-gutenberg-build-process.yml
@@ -101,20 +104,23 @@ jobs:
101104
strategy:
102105
fail-fast: false
103106
matrix:
107+
os: [ 'ubuntu-24.04' ]
104108
directory: [ 'src', 'build' ]
105109
with:
110+
os: ${{ matrix.os }}
106111
directory: ${{ matrix.directory }}
107112

108113
# Tests the Gutenberg plugin build process on additional operating systems.
109114
#
110115
# This is separate from the job above in order to use stricter conditions when determining when to test additional
111-
# operating systems. This avoids unintentionally consuming excessive minutes, as Windows-based jobs consume minutes at
112-
# a 2x rate, and MacOS-based jobs at a 10x rate.
116+
# operating systems. This avoids unintentionally consuming excessive minutes. Windows-based jobs consume minutes at a
117+
# 2x rate, and MacOS-based jobs at a 10x rate.
118+
# See https://docs.github.com/en/billing/concepts/product-billing/github-actions#per-minute-rates.
113119
#
114120
# The `matrix` and `runner` contexts are not available for use within `if` expressions. So there is
115121
# currently no way to determine the OS being used on a given job.
116122
# See https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability.
117-
test-gutenberg-build-process-extended:
123+
test-gutenberg-build-process-additional-os:
118124
name: Gutenberg running from ${{ matrix.directory }}
119125
uses: ./.github/workflows/reusable-test-gutenberg-build-process.yml
120126
permissions:
@@ -135,7 +141,7 @@ jobs:
135141
permissions:
136142
actions: read
137143
contents: read
138-
needs: [ test-core-build-process, test-core-build-process-extended, test-gutenberg-build-process, test-gutenberg-build-process-extended ]
144+
needs: [ test-core-build-process, test-core-build-process-additional-os, test-gutenberg-build-process, test-gutenberg-build-process-additional-os ]
139145
if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
140146
with:
141147
calling_status: ${{ contains( needs.*.result, 'cancelled' ) && 'cancelled' || contains( needs.*.result, 'failure' ) && 'failure' || 'success' }}

.github/workflows/upgrade-develop-testing.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
build:
4848
name: Build
4949
uses: ./.github/workflows/reusable-build-package.yml
50-
if: ${{ github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) }}
50+
if: ${{ startsWith( github.repository, 'WordPress/' ) && ( github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) ) }}
5151
permissions:
5252
contents: read
5353

0 commit comments

Comments
 (0)