2525 - ' src/SECURITY.md'
2626 # These files configure npm and the task runner. Changes could affect the outcome.
2727 - ' package*.json'
28+ - ' .npmrc'
29+ - ' .nvmrc'
2830 - ' Gruntfile.js'
2931 # These files configure Composer. Changes could affect the outcome.
3032 - ' composer.*'
6365 permissions :
6466 contents : read
6567 secrets : inherit
66- if : ${{ github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) }}
68+ if : ${{ startsWith( github.repository, 'WordPress/' ) && ( github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) ) }}
6769 strategy :
6870 fail-fast : false
6971 matrix :
@@ -140,7 +142,7 @@ jobs:
140142 permissions :
141143 contents : read
142144 secrets : inherit
143- if : ${{ github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) }}
145+ if : ${{ startsWith( github.repository, 'WordPress/' ) && ( github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) ) }}
144146 strategy :
145147 fail-fast : false
146148 matrix :
@@ -184,35 +186,32 @@ jobs:
184186 # Because upstream support for innovation releases is dropped when a new one is released (including security updates),
185187 # only the most recent innovation version is tested.
186188 #
189+ # MariaDB does not currently have a supported innovation release.
190+ #
187191 test-innovation-releases :
188192 name : PHP ${{ matrix.php }}
189193 uses : ./.github/workflows/reusable-phpunit-tests-v3.yml
190194 permissions :
191195 contents : read
192196 secrets : inherit
193- if : ${{ github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) }}
197+ if : ${{ startsWith( github.repository, 'WordPress/' ) && ( github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) ) }}
194198 strategy :
195199 fail-fast : false
196200 matrix :
197201 os : [ ubuntu-24.04 ]
198202 php : [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
199- db-type : [ 'mysql', 'mariadb' ]
200- db-version : [ '9.3', '11.7 ' ]
203+ db-type : [ 'mysql' ]
204+ db-version : [ '9.4 ' ]
201205 multisite : [ false, true ]
202206 memcached : [ false ]
203207 db-innovation : [ true ]
204208
205209 exclude :
206210 # MySQL 9.0+ will not work on PHP <= 7.3 because mysql_native_password was removed. See https://core.trac.wordpress.org/ticket/61218.
207211 - php : ' 7.2'
208- db-version : ' 9.3 '
212+ db-version : ' 9.4 '
209213 - php : ' 7.3'
210- db-version : ' 9.3'
211- # Exclude version combinations that don't exist.
212- - db-type : ' mariadb'
213- db-version : ' 9.3'
214- - db-type : ' mysql'
215- db-version : ' 11.7'
214+ db-version : ' 9.4'
216215 with :
217216 os : ${{ matrix.os }}
218217 php : ${{ matrix.php }}
@@ -225,37 +224,100 @@ jobs:
225224 report : ${{ false }}
226225
227226 #
228- # Runs specific individual test groups.
227+ # Runs the HTML API test group.
228+ #
229+ # This test group runs separately due to the large number of tests that are skipped in this group while the
230+ # HTML API is being developed. The skipped tests would otherwise cloud the results of all other test groups.
229231 #
230232 # These tests are run against the most recent LTS version of MySQL.
231233 #
232- specific -test-groups :
233- name : ${{ matrix.phpunit-test-groups }}
234+ html-api -test-groups :
235+ name : ${{ matrix.label }}
234236 uses : ./.github/workflows/reusable-phpunit-tests-v3.yml
235237 permissions :
236238 contents : read
237239 secrets : inherit
238- if : ${{ github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) }}
240+ if : ${{ startsWith( github.repository, 'WordPress/' ) && ( github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) ) }}
239241 strategy :
240242 fail-fast : false
241243 matrix :
242244 php : [ '7.2', '7.4', '8.0', '8.4' ]
243245 db-type : [ 'mysql' ]
244246 db-version : [ '8.4' ]
245247 phpunit-test-groups : [ 'html-api-html5lib-tests' ]
248+ # A matrix value is needed in the 'name' directive for proper grouping in the GitHub UI.
249+ label : [ 'HTML API' ]
246250 with :
247251 php : ${{ matrix.php }}
248252 db-type : ${{ matrix.db-type }}
249253 db-version : ${{ matrix.db-version }}
250254 phpunit-test-groups : ${{ matrix.phpunit-test-groups }}
251255
256+ #
257+ # Runs unit tests for forks.
258+ #
259+ # Because the majority of forks will belong to personal GitHub accounts (which are limited to just 20 concurrent jobs
260+ # at any given time), forks only run a small subset of test combinations. This allows contributors to open pull
261+ # requests back to their own forks for testing purposes without having to wait hours for workflow to complete.
262+ #
263+ limited-matrix-for-forks :
264+ name : PHP ${{ matrix.php }}
265+ uses : ./.github/workflows/reusable-phpunit-tests-v3.yml
266+ permissions :
267+ contents : read
268+ secrets : inherit
269+ if : ${{ ! startsWith( github.repository, 'WordPress/' ) && github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' }}
270+ strategy :
271+ fail-fast : false
272+ matrix :
273+ php : [ '7.2', '8.4' ]
274+ db-version : [ '8.4', '11.8' ]
275+ db-type : [ 'mysql', 'mariadb' ]
276+ multisite : [ false ]
277+
278+ include :
279+ # Include one multisite job for each database type.
280+ - php : ' 8.4'
281+ db-version : ' 8.4'
282+ db-type : ' mysql'
283+ multisite : true
284+ - php : ' 8.4'
285+ db-version : ' 11.8'
286+ db-type : ' mariadb'
287+ multisite : true
288+ # Test with memcached.
289+ - php : ' 8.4'
290+ db-version : ' 8.4'
291+ db-type : ' mysql'
292+ multisite : true
293+ memcached : true
294+ # Run specific test groups once.
295+ - php : ' 8.4'
296+ db-version : ' 8.4'
297+ db-type : ' mysql'
298+ phpunit-test-groups : ' html-api-html5lib-tests'
299+
300+ exclude :
301+ # Exclude PHP versions that are not supported by the database versions.
302+ - db-type : ' mysql'
303+ db-version : ' 11.8'
304+ - db-type : ' mariadb'
305+ db-version : ' 8.4'
306+
307+ with :
308+ php : ${{ matrix.php }}
309+ db-version : ${{ matrix.db-version }}
310+ db-type : ${{ matrix.db-type }}
311+ memcached : ${{ matrix.memcached || false }}
312+ phpunit-test-groups : ${{ matrix.phpunit-test-groups || '' }}
313+
252314 slack-notifications :
253315 name : Slack Notifications
254316 uses : ./.github/workflows/slack-notifications.yml
255317 permissions :
256318 actions : read
257319 contents : read
258- needs : [ test-with-mysql, test-with-mariadb, test-innovation-releases, specific- test-groups ]
320+ needs : [ test-with-mysql, test-with-mariadb, test-innovation-releases, html-api- test-groups, limited-matrix-for-forks ]
259321 if : ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
260322 with :
261323 calling_status : ${{ contains( needs.*.result, 'cancelled' ) && 'cancelled' || contains( needs.*.result, 'failure' ) && 'failure' || 'success' }}
0 commit comments