Skip to content

Commit 405a919

Browse files
committed
Create new matrix for specific groups.
1 parent 4d8b375 commit 405a919

File tree

1 file changed

+33
-12
lines changed

1 file changed

+33
-12
lines changed

.github/workflows/phpunit-tests.yml

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,8 @@ jobs:
5151
tests-domain: [ 'example.org' ]
5252
multisite: [ false, true ]
5353
memcached: [ false ]
54-
group: [ '' ]
5554

5655
include:
57-
# Include a job for running the html5-lib tests.
58-
- os: ubuntu-latest
59-
php: '7.4'
60-
db-type: 'mysql'
61-
db-version: '8.0'
62-
tests-domain: 'example.org'
63-
multisite: false
64-
memcached: false
65-
group: 'html-api-html5lib-teests'
6656
# Include jobs for PHP 7.4 with memcached.
6757
- os: ubuntu-latest
6858
php: '7.4'
@@ -109,7 +99,6 @@ jobs:
10999
multisite: ${{ matrix.multisite }}
110100
memcached: ${{ matrix.memcached }}
111101
phpunit-config: ${{ matrix.multisite && 'tests/phpunit/multisite.xml' || 'phpunit.xml.dist' }}
112-
phpunit-test-groups: ${{ matrix.group }}
113102
tests-domain: ${{ matrix.tests-domain }}
114103
report: ${{ matrix.report || false }}
115104

@@ -157,13 +146,45 @@ jobs:
157146
phpunit-config: ${{ matrix.multisite && 'tests/phpunit/multisite.xml' || 'phpunit.xml.dist' }}
158147
report: ${{ matrix.report || false }}
159148

149+
#
150+
# Runs specific test groups.
151+
#
152+
specific-test-groups:
153+
name: PHP ${{ matrix.php }}
154+
uses: WordPress/wordpress-develop/.github/workflows/reusable-phpunit-tests-v3.yml@trunk
155+
permissions:
156+
contents: read
157+
secrets: inherit
158+
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
159+
strategy:
160+
fail-fast: false
161+
matrix:
162+
os: [ ubuntu-latest ]
163+
php: [ '8.3' ]
164+
db-type: [ 'mysql' ]
165+
db-version: [ '8.0' ]
166+
multisite: [ false ]
167+
memcached: [ false ]
168+
phpunit-test-groups: [ 'html-api-html5lib-tests' ]
169+
170+
with:
171+
os: ${{ matrix.os }}
172+
php: ${{ matrix.php }}
173+
db-type: ${{ matrix.db-type }}
174+
db-version: ${{ matrix.db-version }}
175+
multisite: ${{ matrix.multisite }}
176+
memcached: ${{ matrix.memcached }}
177+
phpunit-config: ${{ matrix.multisite && 'tests/phpunit/multisite.xml' || 'phpunit.xml.dist' }}
178+
phpunit-test-groups: ${{ matrix.phpunit-test-groups }}
179+
report: ${{ matrix.report || false }}
180+
160181
slack-notifications:
161182
name: Slack Notifications
162183
uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
163184
permissions:
164185
actions: read
165186
contents: read
166-
needs: [ test-with-mysql, test-with-mariadb ]
187+
needs: [ test-with-mysql, test-with-mariadb, specific-test-groups ]
167188
if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
168189
with:
169190
calling_status: ${{ contains( needs.*.result, 'cancelled' ) && 'cancelled' || contains( needs.*.result, 'failure' ) && 'failure' || 'success' }}

0 commit comments

Comments
 (0)