diff --git a/.github/workflows/phpunit-tests.yml b/.github/workflows/phpunit-tests.yml index 89f4c0ab64ff8..81d9520b7021b 100644 --- a/.github/workflows/phpunit-tests.yml +++ b/.github/workflows/phpunit-tests.yml @@ -47,7 +47,7 @@ jobs: os: [ ubuntu-latest ] php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ] db-type: [ 'mysql' ] - db-version: [ '5.7', '8.0', '8.4', '9.1' ] + db-version: [ '5.7', '8.0', '8.4' ] tests-domain: [ 'example.org' ] multisite: [ false, true ] memcached: [ false ] @@ -91,14 +91,6 @@ jobs: multisite: false memcached: false report: true - - exclude: - # MySQL 9.0+ will not work on PHP 7.2 & 7.3. See https://core.trac.wordpress.org/ticket/61218. - - php: '7.2' - db-version: '9.1' - - php: '7.3' - db-version: '9.1' - with: os: ${{ matrix.os }} php: ${{ matrix.php }} @@ -154,6 +146,55 @@ jobs: phpunit-config: ${{ matrix.multisite && 'tests/phpunit/multisite.xml' || 'phpunit.xml.dist' }} report: ${{ matrix.report || false }} + # + # Creates PHPUnit test jobs to test MariaDB and MySQL innovation releases. + # + # Though innovation releases are deemed "production grade" and never receive LTS status, they include new features + # and updates that will be included in the next LTS version. + # + # Because upstream support for innovation releases gets dropped when a new one is released, only the most recent + # innovation version is tested. + # + test-innovation-releases: + name: PHP ${{ matrix.php }} + 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: + os: [ ubuntu-latest ] + php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ] + db-type: [ 'mysql', 'mariadb' ] + db-version: [ '9.1', '11.6' ] + multisite: [ false, true ] + memcached: [ false ] + db-innovation: [ true ] + + exclude: + # MySQL 9.0+ will not work on PHP <= 7.3 because mysql_native_password was removed. See https://core.trac.wordpress.org/ticket/61218. + - php: '7.2' + db-version: '9.1' + - php: '7.3' + db-version: '9.1' + # Exclude version combinations that don't exist. + - db-type: 'mariadb' + db-version: '9.1' + - db-type: 'mysql' + db-version: '11.6' + with: + os: ${{ matrix.os }} + php: ${{ matrix.php }} + db-type: ${{ matrix.db-type }} + db-version: ${{ matrix.db-version }} + db-innovation: ${{ matrix.db-innovation }} + multisite: ${{ matrix.multisite }} + memcached: ${{ matrix.memcached }} + phpunit-config: ${{ matrix.multisite && 'tests/phpunit/multisite.xml' || 'phpunit.xml.dist' }} + report: ${{ matrix.report || false }} + # # Runs specific individual test groups. # @@ -183,7 +224,7 @@ jobs: permissions: actions: read contents: read - needs: [ test-with-mysql, test-with-mariadb, specific-test-groups ] + needs: [ test-with-mysql, test-with-mariadb, test-innovation-releases, 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 cac3015af383a..3d26efa7026b2 100644 --- a/.github/workflows/reusable-phpunit-tests-v3.yml +++ b/.github/workflows/reusable-phpunit-tests-v3.yml @@ -27,6 +27,11 @@ on: required: false type: 'string' default: '8.4' + db-innovation: + description: 'Whether a database software innovation release is being tested.' + required: false + type: 'boolean' + default: false multisite: description: 'Whether to run tests as multisite' required: false @@ -105,7 +110,7 @@ jobs: # - Checks out the WordPress Test reporter repository. # - Submit the test results to the WordPress.org host test results. phpunit-tests: - 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 || '' }} + 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.db-innovation && ' (innovation release)' || '' }}${{ 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 }}