Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MySQL 9.1, MariaDB 11.4, and other matrix adjustments #7630

Open
wants to merge 36 commits into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
3a967d9
Add MariaDB 11.4 and MySQL 9.1.
desrosj Oct 23, 2024
1145524
Don't test 9.1 on PHP <= 7.3
desrosj Oct 23, 2024
c976863
Merge remote-tracking branch 'upstream/trunk' into add/mariadb-11-4
desrosj Nov 14, 2024
a5fa34f
Change oldest MariaDB version to oldest maintained LTS.
desrosj Nov 21, 2024
8d539c9
Update upgrade testing to include MySQL 9.x.
desrosj Nov 22, 2024
f21004e
Tweak MariaDB versions.
desrosj Nov 22, 2024
f33b122
Add MySQL 9.1 to the list of supported MySQL versions.
desrosj Nov 22, 2024
a2f6a19
Run the appropriate command for old MariaDB.
desrosj Nov 22, 2024
790c4e1
Test MySQL 9.1 not PHP.
desrosj Nov 22, 2024
c63f628
Adjust the healthcheck test to account for old MariaDB.
desrosj Nov 22, 2024
c380c9c
Merge remote-tracking branch 'upstream/trunk' into add/mariadb-11-4
desrosj Nov 22, 2024
990ae09
Change versins.
desrosj Nov 22, 2024
c388df9
Fix failing command on old MariaDB.
desrosj Nov 22, 2024
5afd35d
Use workflow in the PR to test.
desrosj Nov 22, 2024
70945bf
No branch for local references.
desrosj Nov 22, 2024
7db9323
Remove unintentional change.
desrosj Nov 22, 2024
d5f78f0
MySQL 9.1 does not run on PHP <= 7.3.
desrosj Nov 22, 2024
a2d4af1
Split upgrade test jobs over the spawn limit.
desrosj Nov 22, 2024
5040314
Fix healthcheck command.
desrosj Dec 2, 2024
ab0481e
Add two additional version checks.
desrosj Dec 2, 2024
795c63a
Update README for old MariaDB versions.
desrosj Dec 2, 2024
012a73b
Clean up the healthcheck command.
desrosj Dec 3, 2024
4acaada
Avoid PHP deprecated error.
desrosj Dec 4, 2024
b90aa2c
Pass an empty array instead to match function default.
desrosj Dec 4, 2024
311ec9a
Merge remote-tracking branch 'upstream/trunk' into add/mariadb-11-4
desrosj Dec 4, 2024
9d87a92
Test against latest rolling release to see what happens.
desrosj Dec 4, 2024
f655a52
Merge remote-tracking branch 'upstream/trunk' into add/mariadb-11-4
desrosj Dec 4, 2024
cd27f24
Merge remote-tracking branch 'upstream/trunk' into add/mariadb-11-4
desrosj Dec 4, 2024
fe18489
Merge remote-tracking branch 'upstream/trunk' into add/mariadb-11-4
desrosj Dec 5, 2024
60b3ce4
Group innovation releases in the matrix.
desrosj Dec 5, 2024
2939ec8
Fix typo in condition.
desrosj Dec 5, 2024
05a8383
Merge remote-tracking branch 'upstream/trunk' into add/mariadb-11-4
desrosj Dec 5, 2024
5867223
Add exclusion for thenew local Docker workflow.
desrosj Dec 5, 2024
77bf2b7
Merge remote-tracking branch 'upstream/trunk' into add/mariadb-11-4
desrosj Dec 16, 2024
dee196b
Only test the latest innovation release of MySQL.
desrosj Dec 16, 2024
225202f
Only test the most recent innovation release.
desrosj Dec 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .github/workflows/install-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,19 +78,26 @@ 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'
# 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'
db-version: '9.1'
- php: '7.3'
db-version: '9.0'
db-version: '9.1'

services:
database:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/local-docker-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,13 @@ 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'
db-version: '9.1'
- php: '7.3'
db-version: '9.0'
db-version: '9.1'

with:
os: ${{ matrix.os }}
Expand Down
68 changes: 54 additions & 14 deletions .github/workflows/phpunit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
permissions:
contents: read
secrets: inherit
Expand All @@ -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' ]
tests-domain: [ 'example.org' ]
multisite: [ false, true ]
memcached: [ false ]
Expand Down Expand Up @@ -92,13 +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'

with:
os: ${{ matrix.os }}
php: ${{ matrix.php }}
Expand All @@ -115,7 +108,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
permissions:
contents: read
secrets: inherit
Expand All @@ -126,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: [ '10.4', '10.6', '10.11', '11.2' ]
db-version: [ '5.5', '10.3', '10.4', '10.5', '10.6', '10.11', '11.4' ]
multisite: [ false, true ]
memcached: [ false ]

Expand All @@ -135,13 +128,13 @@ jobs:
- os: ubuntu-latest
php: '8.3'
db-type: 'mariadb'
db-version: '11.2'
db-version: '11.4'
multisite: false
memcached: true
- os: ubuntu-latest
php: '8.3'
db-type: 'mariadb'
db-version: '11.2'
db-version: '11.4'
multisite: true
memcached: true
with:
Expand All @@ -154,13 +147,60 @@ 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.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 }}

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' }}
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/reusable-phpunit-tests-v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 }}

Expand Down
1 change: 1 addition & 0 deletions .version-support-mysql.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"6-8": [
"9.1",
"9.0",
"8.4",
"8.0",
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/tests/db.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) ? array() : explode( ',', $current_modes ) );
}

/**
Expand Down
Loading