Skip to content

Commit 1458de7

Browse files
committed
Build/Test Tools: Regularly run the html-api-html5lib-tests.
In [58010], the external test suite from `html5lib` was imported to validate the tree-construction steps in the HTML Processor to ensure that they are behaving according to the HTML specification. The test group was excluded by default because there are a high number of skipped tests. The number of skipped tests has come down, but the group does not need to be run on every job. This introduces a new job in the PHPUnit workflow for regularly running these tests on their own using the changes in [59251[. Props desrosj, jonsurrell, jorbin, dmsnell, costdev, chaion07, engahmeds3ed. Fixes #61209. git-svn-id: https://develop.svn.wordpress.org/trunk@59528 602fd350-edb4-49c9-b593-d223f7449a82
1 parent ffceac5 commit 1458de7

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

.github/workflows/phpunit-tests.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,36 @@ jobs:
154154
phpunit-config: ${{ matrix.multisite && 'tests/phpunit/multisite.xml' || 'phpunit.xml.dist' }}
155155
report: ${{ matrix.report || false }}
156156

157+
#
158+
# Runs specific individual test groups.
159+
#
160+
specific-test-groups:
161+
name: ${{ matrix.phpunit-test-groups }}
162+
uses: WordPress/wordpress-develop/.github/workflows/reusable-phpunit-tests-v3.yml@trunk
163+
permissions:
164+
contents: read
165+
secrets: inherit
166+
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
167+
strategy:
168+
fail-fast: false
169+
matrix:
170+
php: [ '7.2', '7.4', '8.0', '8.4' ]
171+
db-type: [ 'mysql' ]
172+
db-version: [ '8.4' ]
173+
phpunit-test-groups: [ 'html-api-html5lib-tests' ]
174+
with:
175+
php: ${{ matrix.php }}
176+
db-type: ${{ matrix.db-type }}
177+
db-version: ${{ matrix.db-version }}
178+
phpunit-test-groups: ${{ matrix.phpunit-test-groups }}
179+
157180
slack-notifications:
158181
name: Slack Notifications
159182
uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
160183
permissions:
161184
actions: read
162185
contents: read
163-
needs: [ test-with-mysql, test-with-mariadb ]
186+
needs: [ test-with-mysql, test-with-mariadb, specific-test-groups ]
164187
if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
165188
with:
166189
calling_status: ${{ contains( needs.*.result, 'cancelled' ) && 'cancelled' || contains( needs.*.result, 'failure' ) && 'failure' || 'success' }}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ jobs:
105105
# - Checks out the WordPress Test reporter repository.
106106
# - Submit the test results to the WordPress.org host test results.
107107
phpunit-tests:
108-
name: PHP ${{ inputs.php }} ${{ ! inputs.coverage-report && '/ ' || 'with ' }}${{ 'mariadb' == inputs.db-type && 'MariaDB' || 'MySQL' }} ${{ inputs.db-version }}${{ inputs.multisite && ' multisite' || '' }}${{ inputs.phpunit-test-groups && format( ' ({0})', inputs.phpunit-test-groups ) || '' }}${{ inputs.memcached && ' with memcached' || '' }}${{ inputs.report && ' (test reporting enabled)' || '' }} ${{ 'example.org' != inputs.tests-domain && inputs.tests-domain || '' }}
108+
name: ${{ inputs.phpunit-test-groups && format( '{0} / ', inputs.phpunit-test-groups ) || '' }}PHP ${{ inputs.php }} ${{ ! inputs.phpunit-test-groups && ! inputs.coverage-report && '/ ' || 'with ' }}${{ 'mariadb' == inputs.db-type && 'MariaDB' || 'MySQL' }} ${{ inputs.db-version }}${{ inputs.multisite && ' multisite' || '' }}${{ inputs.memcached && ' with memcached' || '' }}${{ inputs.report && ' (test reporting enabled)' || '' }} ${{ 'example.org' != inputs.tests-domain && inputs.tests-domain || '' }}
109109
runs-on: ${{ inputs.os }}
110110
timeout-minutes: ${{ inputs.coverage-report && 120 || 20 }}
111111

0 commit comments

Comments
 (0)