From 1458de74b6a887a1a9846cf6b85edfe0d9c6f8ee Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Tue, 17 Dec 2024 16:38:07 +0000 Subject: [PATCH] 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 --- .github/workflows/phpunit-tests.yml | 25 ++++++++++++++++++- .../workflows/reusable-phpunit-tests-v3.yml | 2 +- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/.github/workflows/phpunit-tests.yml b/.github/workflows/phpunit-tests.yml index 62a7aa50f7718..d5aa3fa3de5cd 100644 --- a/.github/workflows/phpunit-tests.yml +++ b/.github/workflows/phpunit-tests.yml @@ -154,13 +154,36 @@ jobs: phpunit-config: ${{ matrix.multisite && 'tests/phpunit/multisite.xml' || 'phpunit.xml.dist' }} report: ${{ matrix.report || false }} + # + # Runs specific individual test groups. + # + specific-test-groups: + name: ${{ matrix.phpunit-test-groups }} + uses: WordPress/wordpress-develop/.github/workflows/reusable-phpunit-tests-v3.yml@trunk + permissions: + contents: read + secrets: inherit + if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} + strategy: + fail-fast: false + matrix: + php: [ '7.2', '7.4', '8.0', '8.4' ] + db-type: [ 'mysql' ] + db-version: [ '8.4' ] + phpunit-test-groups: [ 'html-api-html5lib-tests' ] + with: + php: ${{ matrix.php }} + db-type: ${{ matrix.db-type }} + db-version: ${{ matrix.db-version }} + phpunit-test-groups: ${{ matrix.phpunit-test-groups }} + slack-notifications: name: Slack Notifications uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk permissions: actions: read contents: read - needs: [ test-with-mysql, test-with-mariadb ] + needs: [ test-with-mysql, test-with-mariadb, specific-test-groups ] if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }} with: calling_status: ${{ contains( needs.*.result, 'cancelled' ) && 'cancelled' || contains( needs.*.result, 'failure' ) && 'failure' || 'success' }} diff --git a/.github/workflows/reusable-phpunit-tests-v3.yml b/.github/workflows/reusable-phpunit-tests-v3.yml index a12dcdf17d58e..cac3015af383a 100644 --- a/.github/workflows/reusable-phpunit-tests-v3.yml +++ b/.github/workflows/reusable-phpunit-tests-v3.yml @@ -105,7 +105,7 @@ jobs: # - Checks out the WordPress Test reporter repository. # - Submit the test results to the WordPress.org host test results. phpunit-tests: - 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 || '' }} + 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 || '' }} runs-on: ${{ inputs.os }} timeout-minutes: ${{ inputs.coverage-report && 120 || 20 }}