Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
13 changes: 3 additions & 10 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,14 @@ LOCAL_PHP_XDEBUG_MODE=develop,debug
LOCAL_PHP_MEMCACHED=false

##
# The database software to use.
# The database image to use.
#
# Supported values are `mysql` and `mariadb`.
##
LOCAL_DB_TYPE=mysql

##
# The database version to use.
#
# Defaults to 8.0 with the assumption that LOCAL_DB_TYPE is set to `mysql` above.
# Defaults to MySQL 8.0.
#
# When using `mysql`, see https://hub.docker.com/_/mysql for valid versions.
# When using `mariadb`, see https://hub.docker.com/_/mariadb for valid versions.
##
LOCAL_DB_VERSION=8.4
LOCAL_DB_IMAGE=mysql:8.4

# Whether or not to enable multisite.
LOCAL_MULTISITE=false
Expand Down
47 changes: 19 additions & 28 deletions .github/workflows/install-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ jobs:
# - Downloads the specified version of WordPress.
# - Creates a `wp-config.php` file.
# - Installs WordPress.
install-tests-mysql:
name: WP ${{ inputs.wp-version || 'nightly' }} / PHP ${{ matrix.php }} / ${{ 'mariadb' == matrix.db-type && 'MariaDB' || 'MySQL' }} ${{ matrix.db-version }}${{ matrix.multisite && ' multisite' || '' }}
install-tests:
name: WP ${{ inputs.wp-version || 'nightly' }} / PHP ${{ matrix.php }} / ${{ matrix.db-image }}${{ matrix.multisite && ' multisite' || '' }}
permissions:
contents: read
runs-on: ${{ matrix.os }}
Expand All @@ -71,39 +71,32 @@ jobs:
matrix:
os: [ ubuntu-24.04 ]
php: ${{ fromJSON( needs.build-test-matrix.outputs.php-versions ) }}
db-type: [ 'mysql' ]
db-version: ${{ fromJSON( needs.build-test-matrix.outputs.mysql-versions ) }}
db-image: ${{ fromJSON( needs.build-test-matrix.outputs.db-images ) }}
multisite: [ false, true ]
memcached: [ false ]

# Exclude some PHP and MySQL versions that cannot currently be tested with Docker containers.
# Exclude some PHP and database 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'
# The PHP <= 7.3/MySQL 8.4 jobs currently fail due to mysql_native_password being disabled by default. See https://core.trac.wordpress.org/ticket/61218.
- php: '7.2'
db-version: '8.4'
- php: '7.3'
db-version: '8.4'
# Only test the latest innovation release.
- db-version: '9.0'
- db-version: '9.1'
- db-version: '9.2'
- db-version: '9.3'
# 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.4'
- php: '7.3'
db-version: '9.4'
# Containers <= 5.5 do not exist or fail to start properly.
- db-image: 'mariadb:5.0'
- db-image: 'mysql:5.0'
- db-image: 'mariadb:5.1'
- db-image: 'mysql:5.1'
- db-image: 'mariadb:5.5'
- db-image: 'mysql:5.5'
# Only test the latest MySQL innovation release (9.5).
- db-image: 'mysql:9.0'
- db-image: 'mysql:9.1'
- db-image: 'mysql:9.2'
- db-image: 'mysql:9.3'
- db-image: 'mysql:9.4'

services:
database:
image: ${{ matrix.db-type }}:${{ matrix.db-version }}
image: ${{ matrix.db-image }}
ports:
- 3306
options: >-
Expand All @@ -113,8 +106,6 @@ jobs:
--health-retries="5"
-e MYSQL_ROOT_PASSWORD="root"
-e MYSQL_DATABASE="test_db"
--entrypoint sh ${{ matrix.db-type }}:${{ matrix.db-version }}
-c "exec docker-entrypoint.sh mysqld${{ matrix.db-type == 'mysql' && contains( fromJSON('["7.2", "7.3"]'), matrix.php ) && ' --default-authentication-plugin=mysql_native_password' || '' }}"

steps:
- name: Set up PHP ${{ matrix.php }}
Expand Down Expand Up @@ -143,7 +134,7 @@ jobs:
permissions:
actions: read
contents: read
needs: [ install-tests-mysql ]
needs: [ install-tests ]
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
39 changes: 21 additions & 18 deletions .github/workflows/local-docker-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
wp-version: ${{ github.event_name == 'pull_request' && github.base_ref || github.ref_name }}

# Tests the local Docker environment.
environment-tests-mysql:
environment-tests:
name: PHP ${{ matrix.php }}
uses: ./.github/workflows/reusable-test-local-docker-environment-v1.yml
permissions:
Expand All @@ -94,30 +94,33 @@ jobs:
os: [ ubuntu-24.04 ]
memcached: [ false, true ]
php: ${{ fromJSON( needs.build-test-matrix.outputs.php-versions ) }}
db-version: ${{ fromJSON( needs.build-test-matrix.outputs.mysql-versions ) }}
db-image: ${{ fromJSON( needs.build-test-matrix.outputs.db-images ) }}

exclude:
# MySQL containers <= 5.5 do not exist or fail to start properly.
- db-version: '5.5'
# Only test the latest innovation release.
- db-version: '9.0'
- db-version: '9.1'
- db-version: '9.2'
- db-version: '9.3'
# 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.4'
- php: '7.3'
db-version: '9.4'
# There are no local WordPress Docker environment containers for PHP <= 5.3.
- php: '5.2'
- php: '5.3'
# Containers <= 5.5 do not exist or fail to start properly.
- db-image: 'mariadb:5.0'
- db-image: 'mysql:5.0'
- db-image: 'mariadb:5.1'
- db-image: 'mysql:5.1'
- db-image: 'mariadb:5.5'
- db-image: 'mysql:5.5'
# Only test the latest MySQL innovation release (9.5).
- db-image: 'mysql:9.0'
- db-image: 'mysql:9.1'
- db-image: 'mysql:9.2'
- db-image: 'mysql:9.3'
- db-image: 'mysql:9.4'
# No PHP 8.5 + Memcached support yet.
- php: '8.5'
memcached: true

with:
os: ${{ matrix.os }}
php: ${{ matrix.php }}
db-type: 'mysql'
db-version: ${{ matrix.db-version }}
db-image: ${{ matrix.db-image }}
memcached: ${{ matrix.memcached }}

slack-notifications:
Expand All @@ -126,7 +129,7 @@ jobs:
permissions:
actions: read
contents: read
needs: [ build-test-matrix, environment-tests-mysql ]
needs: [ build-test-matrix, environment-tests ]
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 All @@ -141,7 +144,7 @@ jobs:
runs-on: ubuntu-24.04
permissions:
actions: write
needs: [ build-test-matrix, environment-tests-mysql, slack-notifications ]
needs: [ build-test-matrix, environment-tests, slack-notifications ]
if: |
always() &&
github.repository == 'WordPress/wordpress-develop' &&
Expand Down
Loading
Loading