From 3a967d9eb88b1e0a136cd20b32f36bbae1bedfe9 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Wed, 23 Oct 2024 13:27:37 -0400 Subject: [PATCH 01/29] Add MariaDB 11.4 and MySQL 9.1. --- .github/workflows/phpunit-tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/phpunit-tests.yml b/.github/workflows/phpunit-tests.yml index 949e08d5339ca..8b8023b3bdeed 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.0' ] + db-version: [ '5.7', '8.0', '8.4', '9.0', '9.1' ] tests-domain: [ 'example.org' ] multisite: [ false, true ] memcached: [ false ] @@ -126,7 +126,7 @@ jobs: os: [ ubuntu-latest ] php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ] db-type: [ 'mariadb' ] - db-version: [ '10.4', '10.6', '10.11', '11.2' ] + db-version: [ '10.4', '10.6', '10.11', '11.2', '11.4' ] multisite: [ false, true ] memcached: [ false ] @@ -135,13 +135,13 @@ jobs: - os: ubuntu-latest php: '7.4' db-type: 'mariadb' - db-version: '11.2' + db-version: '11.4' multisite: false memcached: true - os: ubuntu-latest php: '7.4' db-type: 'mariadb' - db-version: '11.2' + db-version: '11.4' multisite: true memcached: true with: From 1145524c044d95e86d37c000ebcb4acb2c20f05e Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Wed, 23 Oct 2024 13:40:44 -0400 Subject: [PATCH 02/29] Don't test 9.1 on PHP <= 7.3 --- .github/workflows/phpunit-tests.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/phpunit-tests.yml b/.github/workflows/phpunit-tests.yml index 8b8023b3bdeed..1a0f1651136db 100644 --- a/.github/workflows/phpunit-tests.yml +++ b/.github/workflows/phpunit-tests.yml @@ -98,6 +98,10 @@ jobs: db-version: '9.0' - php: '7.3' db-version: '9.0' + - php: '7.2' + db-version: '9.1' + - php: '7.3' + db-version: '9.1' with: os: ${{ matrix.os }} From a5fa34fbdd72dc8a8c5c5fc1faf8a6bd9389ca51 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers <359867+desrosj@users.noreply.github.com> Date: Thu, 21 Nov 2024 12:39:12 -0500 Subject: [PATCH 03/29] Change oldest MariaDB version to oldest maintained LTS. --- .github/workflows/phpunit-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/phpunit-tests.yml b/.github/workflows/phpunit-tests.yml index 1a0f1651136db..416ac1cba8f4a 100644 --- a/.github/workflows/phpunit-tests.yml +++ b/.github/workflows/phpunit-tests.yml @@ -130,7 +130,7 @@ jobs: os: [ ubuntu-latest ] php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ] db-type: [ 'mariadb' ] - db-version: [ '10.4', '10.6', '10.11', '11.2', '11.4' ] + db-version: [ '10.5', '10.6', '10.11', '11.2', '11.4' ] multisite: [ false, true ] memcached: [ false ] From 8d539c9446e220af77cef9658c21b0c9d8dba034 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Fri, 22 Nov 2024 08:38:10 -0500 Subject: [PATCH 04/29] Update upgrade testing to include MySQL 9.x. --- .github/workflows/upgrade-testing.yml | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/.github/workflows/upgrade-testing.yml b/.github/workflows/upgrade-testing.yml index 8ea2c16bfb36a..c4bab54160e6f 100644 --- a/.github/workflows/upgrade-testing.yml +++ b/.github/workflows/upgrade-testing.yml @@ -45,7 +45,7 @@ jobs: os: [ 'ubuntu-latest' ] php: [ '8.0', '8.1', '8.2', '8.3', '8.4' ] db-type: [ 'mysql' ] - db-version: [ '5.7', '8.0', '8.4' ] + db-version: [ '5.7', '8.0', '8.4', '9.1' ] wp: [ '6.0', '6.1', '6.2', '6.3', '6.4', '6.5', '6.6', '6.7' ] multisite: [ false, true ] @@ -71,7 +71,7 @@ jobs: os: [ 'ubuntu-latest' ] php: [ '7.2', '7.3', '7.4' ] db-type: [ 'mysql' ] - db-version: [ '5.7', '8.0', '8.4' ] + db-version: [ '5.7', '8.0', '8.4', '9.1' ] wp: [ '6.0', '6.1', '6.2', '6.3', '6.4', '6.5', '6.6', '6.7' ] multisite: [ false, true ] @@ -80,6 +80,10 @@ jobs: db-version: '8.4' - php: '7.3' db-version: '8.4' + - php: '7.2' + db-version: '9.1' + - php: '7.3' + db-version: '9.1' with: os: ${{ matrix.os }} php: ${{ matrix.php }} @@ -100,7 +104,7 @@ jobs: os: [ 'ubuntu-latest' ] php: [ '7.2', '7.3', '7.4' ] db-type: [ 'mysql' ] - db-version: [ '5.7', '8.0', '8.4' ] + db-version: [ '5.7', '8.0', '8.4', '9.1' ] wp: [ '5.0', '5.1', '5.2', '5.3', '5.4', '5.5', '5.6', '5.7', '5.8', '5.9' ] multisite: [ false, true ] @@ -109,6 +113,10 @@ jobs: db-version: '8.4' - php: '7.3' db-version: '8.4' + - php: '7.2' + db-version: '9.1' + - php: '7.3' + db-version: '9.1' with: os: ${{ matrix.os }} php: ${{ matrix.php }} @@ -131,7 +139,7 @@ jobs: fail-fast: false matrix: os: [ 'ubuntu-latest' ] - php: [ '8.0', '8.1', '8.2', '8.3', '8.4' ] + php: [ '8.0', '8.1', '8.2', '8.3', '8.4', '9.1' ] db-type: [ 'mysql' ] db-version: [ '5.7', '8.0', '8.4' ] wp: [ '5.3', '5.4', '5.5', '5.6', '5.7', '5.8', '5.9' ] @@ -156,7 +164,7 @@ jobs: os: [ 'ubuntu-latest' ] php: [ '7.2', '7.3', '7.4' ] db-type: [ 'mysql' ] - db-version: [ '5.7', '8.0', '8.4' ] + db-version: [ '5.7', '8.0', '8.4', '9.1' ] wp: [ '4.1', '4.2', '4.3', '4.4', '4.5', '4.6', '4.7', '4.8', '4.9' ] multisite: [ false, true ] @@ -165,6 +173,10 @@ jobs: db-version: '8.4' - php: '7.3' db-version: '8.4' + - php: '7.2' + db-version: '9.1' + - php: '7.3' + db-version: '9.1' with: os: ${{ matrix.os }} php: ${{ matrix.php }} @@ -189,7 +201,7 @@ jobs: os: [ 'ubuntu-latest' ] php: [ '8.0', '8.1', '8.2', '8.3', '8.4' ] db-type: [ 'mysql' ] - db-version: [ '5.7', '8.0', '8.4' ] + db-version: [ '5.7', '8.0', '8.4', '9.1' ] wp: [ '4.1', '4.2', '4.3', '4.4', '4.5' ] multisite: [ false, true ] with: From f21004e84246ac2a9fce4cfe445207b89e309ab5 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Fri, 22 Nov 2024 08:38:52 -0500 Subject: [PATCH 05/29] Tweak MariaDB versions. --- .github/workflows/phpunit-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/phpunit-tests.yml b/.github/workflows/phpunit-tests.yml index 416ac1cba8f4a..60fca624a1764 100644 --- a/.github/workflows/phpunit-tests.yml +++ b/.github/workflows/phpunit-tests.yml @@ -130,7 +130,7 @@ jobs: os: [ ubuntu-latest ] php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ] db-type: [ 'mariadb' ] - db-version: [ '10.5', '10.6', '10.11', '11.2', '11.4' ] + db-version: [ '10.0', '10.1', '10.5', '10.6', '10.11', '11.2', '11.4' ] multisite: [ false, true ] memcached: [ false ] From f33b1229b7e3777737a3e47fa03aeda5143bf24e Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Fri, 22 Nov 2024 08:42:55 -0500 Subject: [PATCH 06/29] Add MySQL 9.1 to the list of supported MySQL versions. --- .version-support-mysql.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.version-support-mysql.json b/.version-support-mysql.json index f6cffac449cae..8616ffb294e43 100644 --- a/.version-support-mysql.json +++ b/.version-support-mysql.json @@ -1,5 +1,6 @@ { "6-8": [ + "9.1", "9.0", "8.4", "8.0", From a2f6a195ca60371eb2e1af1964a0189a486b692d Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Fri, 22 Nov 2024 09:09:39 -0500 Subject: [PATCH 07/29] Run the appropriate command for old MariaDB. --- docker-compose.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 8b90b678a00a2..17ebeaa94c19c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -64,6 +64,7 @@ services: ## mysql: image: ${LOCAL_DB_TYPE-mysql}:${LOCAL_DB_VERSION-latest} + platform: linux/amd64 networks: - wpdevnet @@ -82,7 +83,17 @@ services: command: ${LOCAL_DB_AUTH_OPTION-} healthcheck: - test: [ "CMD-SHELL", "if [ \"$LOCAL_DB_TYPE\" = \"mariadb\" ]; then mariadb-admin ping -h localhost; else mysqladmin ping -h localhost; fi" ] + test: > + [ "CMD-SHELL", + "if [ \"$LOCAL_DB_TYPE\" = \"mariadb\" && + { [ \"$LOCAL_DB_VERSION\" != \"5.5\" ] || + [ \"$LOCAL_DB_VERSION\" != \"10.0\" ] || + [ \"$LOCAL_DB_VERSION\" != \"10.1\" ]; } + then + mariadb-admin ping -h localhost; + else + mysqladmin ping -h localhost; fi" + ] timeout: 5s interval: 5s retries: 10 From 790c4e1d1cae6f4b0955870557379df92b5f06d3 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Fri, 22 Nov 2024 09:20:34 -0500 Subject: [PATCH 08/29] Test MySQL 9.1 not PHP. --- .github/workflows/upgrade-testing.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/upgrade-testing.yml b/.github/workflows/upgrade-testing.yml index c4bab54160e6f..14f0060b0f8bb 100644 --- a/.github/workflows/upgrade-testing.yml +++ b/.github/workflows/upgrade-testing.yml @@ -139,9 +139,9 @@ jobs: fail-fast: false matrix: os: [ 'ubuntu-latest' ] - php: [ '8.0', '8.1', '8.2', '8.3', '8.4', '9.1' ] + php: [ '8.0', '8.1', '8.2', '8.3', '8.4' ] db-type: [ 'mysql' ] - db-version: [ '5.7', '8.0', '8.4' ] + db-version: [ '5.7', '8.0', '8.4', '9.1' ] wp: [ '5.3', '5.4', '5.5', '5.6', '5.7', '5.8', '5.9' ] multisite: [ false, true ] with: From c63f628081785604468f7afa231c6122541d4766 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Fri, 22 Nov 2024 09:22:30 -0500 Subject: [PATCH 09/29] Adjust the healthcheck test to account for old MariaDB. --- docker-compose.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 17ebeaa94c19c..865f9ceb751e5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -83,17 +83,7 @@ services: command: ${LOCAL_DB_AUTH_OPTION-} healthcheck: - test: > - [ "CMD-SHELL", - "if [ \"$LOCAL_DB_TYPE\" = \"mariadb\" && - { [ \"$LOCAL_DB_VERSION\" != \"5.5\" ] || - [ \"$LOCAL_DB_VERSION\" != \"10.0\" ] || - [ \"$LOCAL_DB_VERSION\" != \"10.1\" ]; } - then - mariadb-admin ping -h localhost; - else - mysqladmin ping -h localhost; fi" - ] + test: [ "CMD-SHELL", "if [ \"$LOCAL_DB_TYPE\" = \"mariadb\" && [ \"$LOCAL_DB_VERSION\" != \"5.5\" ] && \"$LOCAL_DB_VERSION\" != \"10.0\" && \"$LOCAL_DB_VERSION\" != \"10.1\" ]; then mariadb-admin ping -h localhost; else mysqladmin ping -h localhost; fi" ] timeout: 5s interval: 5s retries: 10 From 990ae0970b77fdc30e317b8ae6e109db46ff59a0 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Fri, 22 Nov 2024 10:32:46 -0500 Subject: [PATCH 10/29] Change versins. --- .github/workflows/phpunit-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/phpunit-tests.yml b/.github/workflows/phpunit-tests.yml index 60fca624a1764..d8ebd3c49b292 100644 --- a/.github/workflows/phpunit-tests.yml +++ b/.github/workflows/phpunit-tests.yml @@ -130,7 +130,7 @@ jobs: os: [ ubuntu-latest ] php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ] db-type: [ 'mariadb' ] - db-version: [ '10.0', '10.1', '10.5', '10.6', '10.11', '11.2', '11.4' ] + db-version: [ '5.5', '10.3', '10.4', '10.5', '10.6', '10.11', '11.4' ] multisite: [ false, true ] memcached: [ false ] From c388df9b379ccd121b0373bfabcea7e21336538d Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Fri, 22 Nov 2024 10:43:59 -0500 Subject: [PATCH 11/29] Fix failing command on old MariaDB. --- .github/workflows/reusable-phpunit-tests-v3.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-phpunit-tests-v3.yml b/.github/workflows/reusable-phpunit-tests-v3.yml index 56e40e762cd27..fd21b3a9b48f5 100644 --- a/.github/workflows/reusable-phpunit-tests-v3.yml +++ b/.github/workflows/reusable-phpunit-tests-v3.yml @@ -171,7 +171,7 @@ jobs: - name: WordPress Docker container debug information run: | - docker compose run --rm mysql ${{ env.LOCAL_DB_TYPE }} --version + docker compose run --rm mysql ${{ env.LOCAL_DB_TYPE == 'mariadb' && contains( fromJSON('["5.5", "10.0", "10.1", "10.2", "10.3"]'), env.LOCAL_DB_VERSION ) && 'mysql' || env.LOCAL_DB_TYPE }} --version docker compose run --rm php php --version docker compose run --rm php php -m docker compose run --rm php php -i From 5afd35deaf04bff50db5e8256f054b68e0f48a1f Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Fri, 22 Nov 2024 11:00:05 -0500 Subject: [PATCH 12/29] Use workflow in the PR to test. --- .github/workflows/phpunit-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/phpunit-tests.yml b/.github/workflows/phpunit-tests.yml index d8ebd3c49b292..3f303d360a3a9 100644 --- a/.github/workflows/phpunit-tests.yml +++ b/.github/workflows/phpunit-tests.yml @@ -36,7 +36,7 @@ jobs: # test-with-mysql: name: PHP ${{ matrix.php }} - uses: WordPress/wordpress-develop/.github/workflows/reusable-phpunit-tests-v3.yml@trunk + uses: ./.github/workflows/reusable-phpunit-tests-v3.yml@trunk permissions: contents: read secrets: inherit @@ -119,7 +119,7 @@ jobs: # test-with-mariadb: name: PHP ${{ matrix.php }} - uses: WordPress/wordpress-develop/.github/workflows/reusable-phpunit-tests-v3.yml@trunk + uses: ./.github/workflows/reusable-phpunit-tests-v3.yml@trunk permissions: contents: read secrets: inherit From 70945bf7704facf2b640573db3378a41b670cac1 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Fri, 22 Nov 2024 11:02:46 -0500 Subject: [PATCH 13/29] No branch for local references. --- .github/workflows/phpunit-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/phpunit-tests.yml b/.github/workflows/phpunit-tests.yml index 3f303d360a3a9..41160b9273b21 100644 --- a/.github/workflows/phpunit-tests.yml +++ b/.github/workflows/phpunit-tests.yml @@ -36,7 +36,7 @@ jobs: # test-with-mysql: name: PHP ${{ matrix.php }} - uses: ./.github/workflows/reusable-phpunit-tests-v3.yml@trunk + uses: ./.github/workflows/reusable-phpunit-tests-v3.yml permissions: contents: read secrets: inherit @@ -119,7 +119,7 @@ jobs: # test-with-mariadb: name: PHP ${{ matrix.php }} - uses: ./.github/workflows/reusable-phpunit-tests-v3.yml@trunk + uses: ./.github/workflows/reusable-phpunit-tests-v3.yml permissions: contents: read secrets: inherit From 7db9323ea2334d0cf619ae72da04e14e000d3095 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Fri, 22 Nov 2024 11:31:04 -0500 Subject: [PATCH 14/29] Remove unintentional change. --- docker-compose.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 865f9ceb751e5..195b13f3852bf 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -64,7 +64,6 @@ services: ## mysql: image: ${LOCAL_DB_TYPE-mysql}:${LOCAL_DB_VERSION-latest} - platform: linux/amd64 networks: - wpdevnet From d5f78f01b2567e41c70e8f65e2e4f19b57f3f6f9 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Fri, 22 Nov 2024 13:06:30 -0500 Subject: [PATCH 15/29] MySQL 9.1 does not run on PHP <= 7.3. --- .github/workflows/install-testing.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/install-testing.yml b/.github/workflows/install-testing.yml index 9b9036085cd89..a4ef46f3ce719 100644 --- a/.github/workflows/install-testing.yml +++ b/.github/workflows/install-testing.yml @@ -128,10 +128,15 @@ jobs: db-version: '8.4' - php: '7.3' db-version: '8.4' + # MySQL 9.0+ will not work on PHP <= 7.3 because mysql_native_password was removed. - php: '7.2' db-version: '9.0' - php: '7.3' db-version: '9.0' + - php: '7.2' + db-version: '9.1' + - php: '7.3' + db-version: '9.1' services: database: From a2d4af161968facf077d5c3dbd39701c9034139e Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Fri, 22 Nov 2024 13:06:45 -0500 Subject: [PATCH 16/29] Split upgrade test jobs over the spawn limit. --- .github/workflows/upgrade-testing.yml | 61 ++++++++++++++++++++++++--- 1 file changed, 56 insertions(+), 5 deletions(-) diff --git a/.github/workflows/upgrade-testing.yml b/.github/workflows/upgrade-testing.yml index 14f0060b0f8bb..9ffc4e7b1849f 100644 --- a/.github/workflows/upgrade-testing.yml +++ b/.github/workflows/upgrade-testing.yml @@ -33,7 +33,7 @@ permissions: {} jobs: # Spawns upgrade testing from WordPress 6.x versions on PHP 8.x with MySQL. - upgrade-tests-wp-6x-php-8x-mysql: + upgrade-tests-wp-6x-php-8x-mysql-pt-1: name: ${{ matrix.wp }} to ${{ inputs.new-version && inputs.new-version || 'latest' }} uses: WordPress/wordpress-develop/.github/workflows/reusable-upgrade-testing.yml@trunk if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} @@ -46,9 +46,33 @@ jobs: php: [ '8.0', '8.1', '8.2', '8.3', '8.4' ] db-type: [ 'mysql' ] db-version: [ '5.7', '8.0', '8.4', '9.1' ] - wp: [ '6.0', '6.1', '6.2', '6.3', '6.4', '6.5', '6.6', '6.7' ] + wp: [ '6.5', '6.6', '6.7' ] multisite: [ false, true ] + with: + os: ${{ matrix.os }} + php: ${{ matrix.php }} + db-type: ${{ matrix.db-type }} + db-version: ${{ matrix.db-version }} + wp: ${{ matrix.wp }} + new-version: ${{ inputs.new-version && inputs.new-version || 'latest' }} + multisite: ${{ matrix.multisite }} + # Spawns upgrade testing from WordPress 6.x versions on PHP 8.x with MySQL. + upgrade-tests-wp-6x-php-8x-mysql-pt-2: + name: ${{ matrix.wp }} to ${{ inputs.new-version && inputs.new-version || 'latest' }} + uses: WordPress/wordpress-develop/.github/workflows/reusable-upgrade-testing.yml@trunk + if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} + permissions: + contents: read + strategy: + fail-fast: false + matrix: + os: [ 'ubuntu-latest' ] + php: [ '8.0', '8.1', '8.2', '8.3', '8.4' ] + db-type: [ 'mysql' ] + db-version: [ '5.7', '8.0', '8.4', '9.1' ] + wp: [ '6.0', '6.1', '6.2', '6.3', '6.4' ] + multisite: [ false, true ] with: os: ${{ matrix.os }} php: ${{ matrix.php }} @@ -131,7 +155,34 @@ jobs: # WordPress 5.0-5.2 are excluded from PHP 8+ testing because of the following fatal errors: # - Use of __autoload(). # - array/string offset with curly braces. - upgrade-tests-wp-5x-php-8x-mysql: + upgrade-tests-wp-5x-php-8x-mysql-pt-1: + name: ${{ matrix.wp }} to ${{ inputs.new-version && inputs.new-version || 'latest' }} + uses: WordPress/wordpress-develop/.github/workflows/reusable-upgrade-testing.yml@trunk + if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} + strategy: + fail-fast: false + matrix: + os: [ 'ubuntu-latest' ] + php: [ '8.0', '8.1', '8.2', '8.3', '8.4' ] + db-type: [ 'mysql' ] + db-version: [ '5.7', '8.0', '8.4', '9.1' ] + wp: [ '5.3', '5.4', '5.5' ] + multisite: [ false, true ] + with: + os: ${{ matrix.os }} + php: ${{ matrix.php }} + db-type: ${{ matrix.db-type }} + db-version: ${{ matrix.db-version }} + wp: ${{ matrix.wp }} + new-version: ${{ inputs.new-version && inputs.new-version || 'latest' }} + multisite: ${{ matrix.multisite }} + + # Spawns upgrade testing from WordPress 5.x versions on PHP 8.x with MySQL. + # + # WordPress 5.0-5.2 are excluded from PHP 8+ testing because of the following fatal errors: + # - Use of __autoload(). + # - array/string offset with curly braces. + upgrade-tests-wp-5x-php-8x-mysql-pt-2: name: ${{ matrix.wp }} to ${{ inputs.new-version && inputs.new-version || 'latest' }} uses: WordPress/wordpress-develop/.github/workflows/reusable-upgrade-testing.yml@trunk if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} @@ -142,7 +193,7 @@ jobs: php: [ '8.0', '8.1', '8.2', '8.3', '8.4' ] db-type: [ 'mysql' ] db-version: [ '5.7', '8.0', '8.4', '9.1' ] - wp: [ '5.3', '5.4', '5.5', '5.6', '5.7', '5.8', '5.9' ] + wp: [ '5.6', '5.7', '5.8', '5.9' ] multisite: [ false, true ] with: os: ${{ matrix.os }} @@ -219,7 +270,7 @@ jobs: permissions: actions: read contents: read - needs: [ upgrade-tests-wp-6x-php-8x-mysql, upgrade-tests-wp-6x-php-7x-mysql, upgrade-tests-wp-5x-php-7x-mysql, upgrade-tests-wp-5x-php-8x-mysql, upgrade-tests-wp-4x-php-7x-mysql, upgrade-tests-wp-4x-php-8x-mysql ] + needs: [ upgrade-tests-wp-6x-php-8x-mysql-pt-1, upgrade-tests-wp-6x-php-8x-mysql-pt-2, upgrade-tests-wp-6x-php-7x-mysql, upgrade-tests-wp-5x-php-7x-mysql, upgrade-tests-wp-5x-php-8x-mysql-pt-1, upgrade-tests-wp-5x-php-8x-mysql-pt-2, upgrade-tests-wp-4x-php-7x-mysql, upgrade-tests-wp-4x-php-8x-mysql ] 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' }} From 50403148ba4f22739fcdf17cf12ae03ba64c002e Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Mon, 2 Dec 2024 12:08:22 -0500 Subject: [PATCH 17/29] Fix healthcheck command. --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 195b13f3852bf..87893f464d19c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -82,7 +82,7 @@ services: command: ${LOCAL_DB_AUTH_OPTION-} healthcheck: - test: [ "CMD-SHELL", "if [ \"$LOCAL_DB_TYPE\" = \"mariadb\" && [ \"$LOCAL_DB_VERSION\" != \"5.5\" ] && \"$LOCAL_DB_VERSION\" != \"10.0\" && \"$LOCAL_DB_VERSION\" != \"10.1\" ]; then mariadb-admin ping -h localhost; else mysqladmin ping -h localhost; fi" ] + test: [ "CMD-SHELL", "if [ \"$LOCAL_DB_TYPE\" = \"mariadb\" ] && [ \"$LOCAL_DB_VERSION\" != \"5.5\" ] && [ \"$LOCAL_DB_VERSION\" != \"10.0\" ] && [ \"$LOCAL_DB_VERSION\" != \"10.1\" ]; then mariadb-admin ping -h localhost; else mysqladmin ping -h localhost; fi" ] timeout: 5s interval: 5s retries: 10 From ab0481ea17e83ad908e1966be2c6e9d31b18f645 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Mon, 2 Dec 2024 13:17:43 -0500 Subject: [PATCH 18/29] Add two additional version checks. --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 87893f464d19c..7a420e8c7c21c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -82,7 +82,7 @@ services: command: ${LOCAL_DB_AUTH_OPTION-} healthcheck: - test: [ "CMD-SHELL", "if [ \"$LOCAL_DB_TYPE\" = \"mariadb\" ] && [ \"$LOCAL_DB_VERSION\" != \"5.5\" ] && [ \"$LOCAL_DB_VERSION\" != \"10.0\" ] && [ \"$LOCAL_DB_VERSION\" != \"10.1\" ]; then mariadb-admin ping -h localhost; else mysqladmin ping -h localhost; fi" ] + test: [ "CMD-SHELL", "if [ \"$LOCAL_DB_TYPE\" = \"mariadb\" ] && [ \"$LOCAL_DB_VERSION\" != \"5.5\" ] && [ \"$LOCAL_DB_VERSION\" != \"10.0\" ] && [ \"$LOCAL_DB_VERSION\" != \"10.1\" ] && [ \"$LOCAL_DB_VERSION\" != \"10.2\" ] && [ \"$LOCAL_DB_VERSION\" != \"10.3\" ]; then mariadb-admin ping -h localhost; else mysqladmin ping -h localhost; fi" ] timeout: 5s interval: 5s retries: 10 From 795c63a3c081603734e2cd12b09889d99cf347e3 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Mon, 2 Dec 2024 13:20:13 -0500 Subject: [PATCH 19/29] Update README for old MariaDB versions. --- README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index adb4fc946d9a8..fc8c00f6821af 100644 --- a/README.md +++ b/README.md @@ -139,11 +139,14 @@ The development environment can be reset. This will destroy the database and att npm run env:reset ``` -### Apple Silicon machines and old MySQL versions +### Apple Silicon machines and old MySQL/MariaDB versions -The MySQL Docker images do not support Apple Silicon processors (M1, M2, etc.) for MySQL versions 5.7 and earlier. +Older MySQL and MariaDB Docker images do not support Apple Silicon processors (M1, M2, etc.). This is true for: -When using MySQL <= 5.7 on an Apple Silicon machine, you must create a `docker-compose.override.yml` file with the following contents: +- MySQL versions 5.7 and earlier +- MariaDB 5.5 + +When using these versions on an Apple Silicon machine, you must create a `docker-compose.override.yml` file with the following contents: ``` services: From 012a73b7578675237ede91e1e1096527595b6ebc Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Tue, 3 Dec 2024 18:52:16 -0500 Subject: [PATCH 20/29] Clean up the healthcheck command. --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 7a420e8c7c21c..a95735fdd35a0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -82,7 +82,7 @@ services: command: ${LOCAL_DB_AUTH_OPTION-} healthcheck: - test: [ "CMD-SHELL", "if [ \"$LOCAL_DB_TYPE\" = \"mariadb\" ] && [ \"$LOCAL_DB_VERSION\" != \"5.5\" ] && [ \"$LOCAL_DB_VERSION\" != \"10.0\" ] && [ \"$LOCAL_DB_VERSION\" != \"10.1\" ] && [ \"$LOCAL_DB_VERSION\" != \"10.2\" ] && [ \"$LOCAL_DB_VERSION\" != \"10.3\" ]; then mariadb-admin ping -h localhost; else mysqladmin ping -h localhost; fi" ] + test: [ "CMD-SHELL", "if [ \"$LOCAL_DB_TYPE\" = \"mariadb\" ]; then case \"$LOCAL_DB_VERSION\" in 5.5|10.0|10.1|10.2|10.3) mysqladmin ping -h localhost || exit $?;; *) mariadb-admin ping -h localhost || exit $?;; esac; else mysqladmin ping -h localhost || exit $?; fi" ] timeout: 5s interval: 5s retries: 10 From 4acaada985b2efca63e8103e028ffa676ace1578 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Tue, 3 Dec 2024 19:03:07 -0500 Subject: [PATCH 21/29] Avoid PHP deprecated error. --- tests/phpunit/tests/db.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/phpunit/tests/db.php b/tests/phpunit/tests/db.php index 3e06afcc1bf2c..fc2413751ff47 100644 --- a/tests/phpunit/tests/db.php +++ b/tests/phpunit/tests/db.php @@ -296,7 +296,7 @@ public function test_set_sql_mode() { $check_new_modes = $wpdb->get_var( 'SELECT @@SESSION.sql_mode;' ); $this->assertSameSets( $new_modes, explode( ',', $check_new_modes ) ); - $wpdb->set_sql_mode( explode( ',', $current_modes ) ); + $wpdb->set_sql_mode( empty( $current_modes ) ? '' : explode( ',', $current_modes ) ); } /** From b90aa2cb640b123ad6757e80932ac3e3220e26af Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Tue, 3 Dec 2024 19:29:12 -0500 Subject: [PATCH 22/29] Pass an empty array instead to match function default. --- tests/phpunit/tests/db.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/phpunit/tests/db.php b/tests/phpunit/tests/db.php index fc2413751ff47..57f5db65a2f5a 100644 --- a/tests/phpunit/tests/db.php +++ b/tests/phpunit/tests/db.php @@ -296,7 +296,7 @@ public function test_set_sql_mode() { $check_new_modes = $wpdb->get_var( 'SELECT @@SESSION.sql_mode;' ); $this->assertSameSets( $new_modes, explode( ',', $check_new_modes ) ); - $wpdb->set_sql_mode( empty( $current_modes ) ? '' : explode( ',', $current_modes ) ); + $wpdb->set_sql_mode( empty( $current_modes ) ? array() : explode( ',', $current_modes ) ); } /** From 9d87a929aff396dddb5395c696bef32bd7777970 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Tue, 3 Dec 2024 20:07:40 -0500 Subject: [PATCH 23/29] Test against latest rolling release to see what happens. --- .github/workflows/phpunit-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/phpunit-tests.yml b/.github/workflows/phpunit-tests.yml index 41160b9273b21..b36e66c05d4a4 100644 --- a/.github/workflows/phpunit-tests.yml +++ b/.github/workflows/phpunit-tests.yml @@ -130,7 +130,7 @@ jobs: os: [ ubuntu-latest ] php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ] db-type: [ 'mariadb' ] - db-version: [ '5.5', '10.3', '10.4', '10.5', '10.6', '10.11', '11.4' ] + db-version: [ '5.5', '10.3', '10.4', '10.5', '10.6', '10.11', '11.4', '11.6' ] multisite: [ false, true ] memcached: [ false ] From 60b3ce4c6d810d84f40ea55c183c8b2885d0563d Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Thu, 5 Dec 2024 11:36:02 -0500 Subject: [PATCH 24/29] Group innovation releases in the matrix. --- .github/workflows/install-testing.yml | 6 +- .github/workflows/phpunit-tests.yml | 70 +++++++++++++++---- .../workflows/reusable-phpunit-tests-v3.yml | 7 +- 3 files changed, 67 insertions(+), 16 deletions(-) diff --git a/.github/workflows/install-testing.yml b/.github/workflows/install-testing.yml index 4c38a131e6a10..06d7360e68603 100644 --- a/.github/workflows/install-testing.yml +++ b/.github/workflows/install-testing.yml @@ -78,16 +78,20 @@ jobs: # Exclude some PHP and MySQL versions that cannot currently be tested with Docker containers. exclude: + # There are no local WordPress Docker environment containers for PHP <= 5.3. - php: '5.2' - php: '5.3' + + # MySQL containers <= 5.5 do not exist or fail to start properly. - db-version: '5.0' - db-version: '5.1' - db-version: '5.5' + - php: '7.2' db-version: '8.4' - php: '7.3' db-version: '8.4' - # MySQL 9.0+ will not work on PHP <= 7.3 because mysql_native_password was removed. + # 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.0' - php: '7.3' diff --git a/.github/workflows/phpunit-tests.yml b/.github/workflows/phpunit-tests.yml index 87d9179e2119f..91adfac70f5c9 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.0', '9.1' ] + db-version: [ '5.7', '8.0', '8.4' ] tests-domain: [ 'example.org' ] multisite: [ false, true ] memcached: [ false ] @@ -92,17 +92,6 @@ jobs: memcached: false report: true - exclude: - # MySQL 9.0+ will not work on PHP 7.2 & 7.3 - - php: '7.2' - db-version: '9.0' - - php: '7.3' - db-version: '9.0' - - php: '7.2' - db-version: '9.1' - - php: '7.3' - db-version: '9.1' - with: os: ${{ matrix.os }} php: ${{ matrix.php }} @@ -130,7 +119,7 @@ jobs: os: [ ubuntu-latest ] php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ] db-type: [ 'mariadb' ] - db-version: [ '5.5', '10.3', '10.4', '10.5', '10.6', '10.11', '11.4', '11.6' ] + db-version: [ '5.5', '10.3', '10.4', '10.5', '10.6', '10.11', '11.4' ] multisite: [ false, true ] memcached: [ false ] @@ -158,13 +147,66 @@ 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. + # + test-innovation-releases: + name: PHP ${{ matrix.php }} + uses: ./.github/workflows/reusable-phpunit-tests-v3.yml + 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.0', '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.0' + - php: '7.3' + db-version: '9.0' + - 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.0' + - 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 }} + 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, test-innovation-releases ] 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 fd21b3a9b48f5..2cf90add10e7f 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.0' + 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: 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: PHP ${{ inputs.php }} ${{ ! inputs.coverage-report && '/ ' || 'with ' }}${{ 'mariadb' == inputs.db-type && 'MariaDB' || 'MySQL' }} ${{ inputs.db-version }}${{ inputs.multisite && ' multisite' || '' }}${{ inputs.db-innovation $$ ' (innovation release)' || '' }}${{ 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 || '' }} runs-on: ${{ inputs.os }} timeout-minutes: ${{ inputs.coverage-report && 120 || 20 }} From 2939ec871340dd005f3780c2174c8b15b44f938d Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Thu, 5 Dec 2024 11:37:01 -0500 Subject: [PATCH 25/29] Fix typo in condition. --- .github/workflows/reusable-phpunit-tests-v3.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-phpunit-tests-v3.yml b/.github/workflows/reusable-phpunit-tests-v3.yml index 2cf90add10e7f..e10063bc3d511 100644 --- a/.github/workflows/reusable-phpunit-tests-v3.yml +++ b/.github/workflows/reusable-phpunit-tests-v3.yml @@ -110,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: PHP ${{ inputs.php }} ${{ ! inputs.coverage-report && '/ ' || 'with ' }}${{ 'mariadb' == inputs.db-type && 'MariaDB' || 'MySQL' }} ${{ inputs.db-version }}${{ inputs.multisite && ' multisite' || '' }}${{ inputs.db-innovation $$ ' (innovation release)' || '' }}${{ 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: PHP ${{ inputs.php }} ${{ ! inputs.coverage-report && '/ ' || 'with ' }}${{ 'mariadb' == inputs.db-type && 'MariaDB' || 'MySQL' }} ${{ inputs.db-version }}${{ inputs.multisite && ' multisite' || '' }}${{ inputs.db-innovation && ' (innovation release)' || '' }}${{ 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 || '' }} runs-on: ${{ inputs.os }} timeout-minutes: ${{ inputs.coverage-report && 120 || 20 }} From 5867223fd96c07a2203d903cb24c5619a788a997 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Thu, 5 Dec 2024 13:41:59 -0500 Subject: [PATCH 26/29] Add exclusion for thenew local Docker workflow. --- .github/workflows/local-docker-environment.yml | 4 ++++ .github/workflows/upgrade-testing.yml | 3 +++ 2 files changed, 7 insertions(+) diff --git a/.github/workflows/local-docker-environment.yml b/.github/workflows/local-docker-environment.yml index 1e25c82ef1287..48cd0a3381036 100644 --- a/.github/workflows/local-docker-environment.yml +++ b/.github/workflows/local-docker-environment.yml @@ -95,6 +95,10 @@ jobs: db-version: '9.0' - php: '7.3' db-version: '9.0' + - php: '7.2' + db-version: '9.1' + - php: '7.3' + db-version: '9.1' with: os: ${{ matrix.os }} diff --git a/.github/workflows/upgrade-testing.yml b/.github/workflows/upgrade-testing.yml index 9ffc4e7b1849f..bda02ee6490b2 100644 --- a/.github/workflows/upgrade-testing.yml +++ b/.github/workflows/upgrade-testing.yml @@ -104,6 +104,7 @@ jobs: db-version: '8.4' - php: '7.3' db-version: '8.4' + # 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' @@ -137,6 +138,7 @@ jobs: db-version: '8.4' - php: '7.3' db-version: '8.4' + # 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' @@ -224,6 +226,7 @@ jobs: db-version: '8.4' - php: '7.3' db-version: '8.4' + # 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' From dee196b71d4b0b1ca18332c72159d064ed222662 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Mon, 16 Dec 2024 15:19:03 -0500 Subject: [PATCH 27/29] Only test the latest innovation release of MySQL. --- .github/workflows/phpunit-tests.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/phpunit-tests.yml b/.github/workflows/phpunit-tests.yml index 91adfac70f5c9..c552456579fb1 100644 --- a/.github/workflows/phpunit-tests.yml +++ b/.github/workflows/phpunit-tests.yml @@ -166,24 +166,18 @@ jobs: 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.0', '9.1', '11.6' ] + 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.0' - - php: '7.3' - db-version: '9.0' - 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.0' - db-type: 'mariadb' db-version: '9.1' - db-type: 'mysql' From 225202f18f38abdb9fa476166edfd5d19a0ba4e3 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Mon, 16 Dec 2024 15:23:54 -0500 Subject: [PATCH 28/29] Only test the most recent innovation release. --- .github/workflows/install-testing.yml | 6 ++---- .github/workflows/local-docker-environment.yml | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/install-testing.yml b/.github/workflows/install-testing.yml index 06d7360e68603..680735e6b1e21 100644 --- a/.github/workflows/install-testing.yml +++ b/.github/workflows/install-testing.yml @@ -91,11 +91,9 @@ jobs: db-version: '8.4' - php: '7.3' db-version: '8.4' + # Only test the latest innovation release. + - db-version: '9.0' # 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.0' - - php: '7.3' - db-version: '9.0' - php: '7.2' db-version: '9.1' - php: '7.3' diff --git a/.github/workflows/local-docker-environment.yml b/.github/workflows/local-docker-environment.yml index 48cd0a3381036..1db803a7ebf99 100644 --- a/.github/workflows/local-docker-environment.yml +++ b/.github/workflows/local-docker-environment.yml @@ -90,11 +90,9 @@ jobs: exclude: # The MySQL 5.5 containers will not start. - db-version: '5.5' + # Only test the latest innovation release. + - db-version: '9.0' # MySQL 9.0+ will not work on PHP 7.2 & 7.3 - - php: '7.2' - db-version: '9.0' - - php: '7.3' - db-version: '9.0' - php: '7.2' db-version: '9.1' - php: '7.3' From 47f146a711d258a3c5b07a721fc1f0f2a914a2f8 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Tue, 7 Jan 2025 09:25:09 -0500 Subject: [PATCH 29/29] Add note about why one innovation version is tested. --- .github/workflows/phpunit-tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/phpunit-tests.yml b/.github/workflows/phpunit-tests.yml index cf72bcb7e7c67..f52ce971e5489 100644 --- a/.github/workflows/phpunit-tests.yml +++ b/.github/workflows/phpunit-tests.yml @@ -152,6 +152,9 @@ jobs: # 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: ./.github/workflows/reusable-phpunit-tests-v3.yml