Skip to content

Commit

Permalink
Build/Test Tools: Test MariaDB innovation releases.
Browse files Browse the repository at this point in the history
MariaDB also follows the innovation release model. This adds testing for these releases to the test matrix and moves innovation versions to a new job in order to more clearly differentiate from LTS ones.

The current innovation release for MariaDB is `11.6`.

Props johnbillion, jorbin.
See #62221.

git-svn-id: https://develop.svn.wordpress.org/trunk@59586 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
desrosj committed Jan 7, 2025
1 parent 615b03f commit 8c45570
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 11 deletions.
61 changes: 51 additions & 10 deletions .github/workflows/phpunit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -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.
#
Expand Down Expand Up @@ -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' }}
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.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
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: ${{ 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 }}

Expand Down

0 comments on commit 8c45570

Please sign in to comment.