From 4fc04545dd1c22ef186d3e0e0e09abd6c42cd360 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Fri, 13 Oct 2023 10:55:58 -0400 Subject: [PATCH 01/21] First pass at adding a dynamic matrix and MariaDB testing. --- .github/workflows/install-testing.yml | 114 ++++++++++++++++++++++++-- 1 file changed, 109 insertions(+), 5 deletions(-) diff --git a/.github/workflows/install-testing.yml b/.github/workflows/install-testing.yml index d83f56b3792a6..2f35aeb3405c1 100644 --- a/.github/workflows/install-testing.yml +++ b/.github/workflows/install-testing.yml @@ -30,6 +30,55 @@ concurrency: permissions: {} jobs: + # Determines the appropriate values for PHP and database versions based on the WordPress version being tested. + # + # Performs the following steps: + # - Checks out the repository. + # - Fetches the versions of PHP to test. + # - Fetches the versions of MySQL to test. + # - Fetches the versions of MariaDB to test. + build-matrix: + name: Determine PHP Versions to test + runs-on: ubuntu-latest + timeout-minutes: 5 + outputs: + php-versions: ${{ steps.php-versions.outputs.versions }} + mysql-versions: ${{ steps.mysql-versions.outputs.versions }} + mariadb-versions: ${{ steps.mariadb-versions.outputs.versions }} + + steps: + - name: Checkout repository + uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + with: + show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} + + - name: Get supported PHP versions + id: php-versions + run: | + if -n "${{ inputs.wp-version }}" ] && [ "${{ inputs.wp-version }}" != "latest" ]; then + echo "versions=$(jq '.["${{ inputs.wp-version }}"] | @json' version-support-php.json)" >> $GITHUB_OUTPUT + else + echo "versions=$(jq -r '.[ (keys[-1]) ] | @json' version-support-php.json)" >> $GITHUB_OUTPUT + fi + + - name: Get supported MySQL versions + id: mysql-versions + run: | + if -n "${{ inputs.wp-version }}" ] && [ "${{ inputs.wp-version }}" != "latest" ]; then + echo "versions=$(jq -r '.["${{ inputs.wp-version }}"] | @json' version-support-mysql.json)" >> $GITHUB_OUTPUT + else + echo "versions=$(jq -r '.[ (keys[-1]) ] | @json' version-support-mysql.json)" >> $GITHUB_OUTPUT + fi + + - name: Get supported MariaDB versions + id: mariadb-versions + run: | + if -n "${{ inputs.wp-version }}" ] && [ "${{ inputs.wp-version }}" != "latest" ]; then + echo "versions=$(jq -r '.["${{ inputs.wp-version }}"] | @json' version-support-mariadb.json)" >> $GITHUB_OUTPUT + else + echo "versions=$(jq -r '.[ (keys[-1]) ] | @json' version-support-mariadb.json)" >> $GITHUB_OUTPUT + fi + # Test the WordPress installation process through WP-CLI. # # Performs the following steps: @@ -42,23 +91,78 @@ jobs: name: WP ${{ inputs.wp-version || 'latest' }} / PHP ${{ matrix.php }} / ${{ 'mariadb' == matrix.db-type && 'MariaDB' || 'MySQL' }} ${{ matrix.db-version }}${{ matrix.multisite && ' multisite' || '' }} permissions: contents: read - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} timeout-minutes: 10 + needs: [ build-matrix ] strategy: fail-fast: false matrix: os: [ ubuntu-latest ] - php: [ '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ] + php: ${{ fromJSON( needs.build-matrix.outputs.php-versions ) }} db-type: [ 'mysql' ] - db-version: [ '5.7', '8.0' ] + db-version: ${{ fromJSON( needs.build-matrix.outputs.mysql-versions ) }} + multisite: [ false, true ] + memcached: [ false ] + + services: + database: + image: ${{ matrix.db-type }}:${{ matrix.db-version }} + ports: + - 3306 + options: --health-cmd="${{ matrix.db-type == 'mysql' && 'mysqladmin' || 'mariadb-admin' }} ping" --health-interval=30s --health-timeout=10s --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-version != '5.5' && ' --default-authentication-plugin=mysql_native_password"' || '' }} + + steps: + - name: Set up PHP ${{ matrix.php }} + uses: shivammathur/setup-php@7fdd3ece872ec7ec4c098ae5ab7637d5e0a96067 # v2.26.0 + with: + php-version: '${{ matrix.php }}' + coverage: none + tools: wp-cli + + - name: Start the database server + run: | + sudo systemctl start ${{ matrix.db-type }} + + - name: Download WordPress + run: wp core download ${{ inputs.wp-version && 'latest' != inputs.wp-version && format( '--version={0}', inputs.wp-version ) || '' }} + + - name: Create wp-config.php file + run: wp config create --dbname=test_db --dbuser=root --dbpass=root --dbhost=127.0.0.1:${{ job.services.database.ports['3306'] }} + + - name: Install WordPress + run: wp core ${{ matrix.multisite && 'multisite-' || '' }}install --url=http://localhost/ --title="Upgrade Test" --admin_user=admin --admin_password=password --admin_email=me@example.org --skip-email + + # Test the WordPress installation process through WP-CLI. + # + # Performs the following steps: + # - Sets up PHP. + # - Starts the database server. + # - Downloads the specified version of WordPress. + # - Creates a `wp-config.php` file. + # - Installs WordPress. + install-tests-mariadb: + name: WP ${{ inputs.wp-version || 'latest' }} / PHP ${{ matrix.php }} / ${{ 'mariadb' == matrix.db-type && 'MariaDB' || 'MySQL' }} ${{ matrix.db-version }}${{ matrix.multisite && ' multisite' || '' }} / ${{ matrix.os }} + permissions: + contents: read + runs-on: ${{ matrix.os }} + timeout-minutes: 10 + needs: [ build-matrix ] + strategy: + fail-fast: false + matrix: + os: [ ubuntu-latest ] + php: ${{ fromJSON( needs.build-matrix.outputs.php-versions ) }} + db-type: [ 'mariadb' ] + db-version: ${{ fromJSON( needs.build-matrix.outputs.mariadb-versions ) }} multisite: [ false, true ] + memcached: [ false ] services: database: image: ${{ matrix.db-type }}:${{ matrix.db-version }} ports: - 3306 - options: --health-cmd="mysqladmin ping" --health-interval=30s --health-timeout=10s --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 --default-authentication-plugin=mysql_native_password" + options: --health-cmd="mysqladmin ping" --health-interval=30s --health-timeout=10s --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-version != '5.5' && ' --default-authentication-plugin=mysql_native_password"' || '' }} steps: - name: Set up PHP ${{ matrix.php }} @@ -87,7 +191,7 @@ jobs: permissions: actions: read contents: read - needs: [ install-tests-mysql ] + needs: [ install-tests-mysql, install-tests-mariadb ] 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 3314dce107628284d28153cc5dfa1a3abe9e69a4 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Fri, 13 Oct 2023 10:58:10 -0400 Subject: [PATCH 02/21] Add versioning files. --- version-support-mariadb.json | 50 +++++++++ version-support-mysql.json | 107 +++++++++++++++++++ version-support-php.json | 197 +++++++++++++++++++++++++++++++++++ 3 files changed, 354 insertions(+) create mode 100644 version-support-mariadb.json create mode 100644 version-support-mysql.json create mode 100644 version-support-php.json diff --git a/version-support-mariadb.json b/version-support-mariadb.json new file mode 100644 index 0000000000000..ce4b762ae77e8 --- /dev/null +++ b/version-support-mariadb.json @@ -0,0 +1,50 @@ +{ + "6-3": [ + "11.0", + "10.11", + "10.6", + "10.4" + ], + "6-2": [ + "11.0", + "10.11", + "10.6", + "10.4" + ], + "6-1": [ + "11.0", + "10.11", + "10.6", + "10.4" + ], + "6-0": [ + "11.0", + "10.11", + "10.6", + "10.4" + ], + "5-9": [ + "11.0", + "10.11", + "10.6", + "10.4" + ], + "5-8": [], + "5-7": [], + "5-6": [], + "5-5": [], + "5-4": [], + "5-3": [], + "5-2": [], + "5-1": [], + "5-0": [], + "4-9": [], + "4-8": [], + "4-7": [], + "4-6": [], + "4-5": [], + "4-4": [], + "4-3": [], + "4-2": [], + "4-1": [] +} diff --git a/version-support-mysql.json b/version-support-mysql.json new file mode 100644 index 0000000000000..82e497aae616d --- /dev/null +++ b/version-support-mysql.json @@ -0,0 +1,107 @@ +{ + "6-3": [ + "8.0", + "5.7" + ], + "6-2": [ + "8.0", + "5.7" + ], + "6-1": [ + "8.0", + "5.7" + ], + "6-0": [ + "8.0", + "5.7" + ], + "5-9": [ + "8.0", + "5.7" + ], + "5-8": [ + "8.0", + "5.7", + "5.6" + ], + "5-7": [ + "8.0", + "5.7", + "5.6" + ], + "5-6": [ + "8.0", + "5.7", + "5.6" + ], + "5-5": [ + "8.0", + "5.7", + "5.6" + ], + "5-4": [ + "8.0", + "5.7", + "5.6" + ], + "5-3": [ + "8.0", + "5.7", + "5.6" + ], + "5-2": [ + "8.0", + "5.7", + "5.6" + ], + "5-1": [ + "8.0", + "5.7", + "5.6" + ], + "5-0": [ + "8.0", + "5.7", + "5.6" + ], + "4-9": [ + "5.7", + "5.6" + ], + "4-8": [ + "5.7", + "5.6" + ], + "4-7": [ + "5.7", + "5.6" + ], + "4-6": [ + "5.7", + "5.6" + ], + "4-5": [ + "5.7", + "5.6" + ], + "4-4": [ + "5.7", + "5.6", + "5.5" + ], + "4-3": [ + "5.7", + "5.6", + "5.5" + ], + "4-2": [ + "5.7", + "5.6", + "5.5" + ], + "4-1": [ + "5.7", + "5.6", + "5.5" + ] +} diff --git a/version-support-php.json b/version-support-php.json new file mode 100644 index 0000000000000..54ce28dbf6ad9 --- /dev/null +++ b/version-support-php.json @@ -0,0 +1,197 @@ +{ + "6-3": [ + "7.0", + "7.1", + "7.2", + "7.3", + "7.4", + "8.0", + "8.1", + "8.2", + "8.3" + ], + "6-2": [ + "5.6", + "7.0", + "7.1", + "7.2", + "7.3", + "7.4", + "8.0", + "8.1", + "8.2" + ], + "6-1": [ + "5.6", + "7.0", + "7.1", + "7.2", + "7.3", + "7.4", + "8.0", + "8.1", + "8.2" + ], + "6-0": [ + "5.6", + "7.0", + "7.1", + "7.2", + "7.3", + "7.4", + "8.0", + "8.1" + ], + "5-9": [ + "5.6", + "7.0", + "7.1", + "7.2", + "7.3", + "7.4", + "8.0", + "8.1" + ], + "5-8": [ + "5.6", + "7.0", + "7.1", + "7.2", + "7.3", + "7.4", + "8.0" + ], + "5-7": [ + "5.6", + "7.0", + "7.1", + "7.2", + "7.3", + "7.4", + "8.0" + ], + "5-6": [ + "5.6", + "7.0", + "7.1", + "7.2", + "7.3", + "7.4", + "8.0" + ], + "5-5": [ + "5.6", + "7.0", + "7.1", + "7.2", + "7.3", + "7.4" + ], + "5-4": [ + "5.6", + "7.0", + "7.1", + "7.2", + "7.3", + "7.4" + ], + "5-3": [ + "5.6", + "7.0", + "7.1", + "7.2", + "7.3", + "7.4" + ], + "5-2": [ + "5.6", + "7.0", + "7.1", + "7.2", + "7.3" + ], + "5-1": [ + "5.3", + "5.4", + "5.5", + "5.6", + "7.0", + "7.1", + "7.2", + "7.3" + ], + "5-0": [ + "5.3", + "5.4", + "5.5", + "5.6", + "7.0", + "7.1", + "7.2", + "7.3" + ], + "4-9": [ + "5.3", + "5.4", + "5.5", + "5.6", + "7.0", + "7.1", + "7.2" + ], + "4-8": [ + "5.3", + "5.4", + "5.5", + "5.6", + "7.0", + "7.1" + ], + "4-7": [ + "5.3", + "5.4", + "5.5", + "5.6", + "7.0", + "7.1" + ], + "4-6": [ + "5.3", + "5.4", + "5.5", + "5.6", + "7.0" + ], + "4-5": [ + "5.3", + "5.4", + "5.5", + "5.6", + "7.0" + ], + "4-4": [ + "5.3", + "5.4", + "5.5", + "5.6", + "7.0" + ], + "4-3": [ + "5.3", + "5.4", + "5.5", + "5.6" + ], + "4-2": [ + "5.3", + "5.4", + "5.5", + "5.6" + ], + "4-1": [ + "5.3", + "5.4", + "5.5", + "5.6" + ] +} From 1c65ff3eda5aa02fe663a021fa3a77ef4564b2ac Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Fri, 13 Oct 2023 15:07:20 -0400 Subject: [PATCH 03/21] Some bug fixes and improvements. --- .github/workflows/install-testing.yml | 47 ++++++++++++++++++++------- 1 file changed, 36 insertions(+), 11 deletions(-) diff --git a/.github/workflows/install-testing.yml b/.github/workflows/install-testing.yml index 2f35aeb3405c1..65d9846dc4b73 100644 --- a/.github/workflows/install-testing.yml +++ b/.github/workflows/install-testing.yml @@ -52,11 +52,20 @@ jobs: with: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} + - name: Determine major WordPress version + id: wp-version + run: | + if [ "${{ inputs.wp-version }}" ] && [ "${{ inputs.wp-version }}" != "latest" ]; then + echo "version=$(echo "${{ inputs.wp-version }}" | tr '.' '-' | cut -d '-' -f1-2)" >> $GITHUB_OUTPUT + else + echo "version=latest" >> $GITHUB_OUTPUT + fi + - name: Get supported PHP versions id: php-versions run: | - if -n "${{ inputs.wp-version }}" ] && [ "${{ inputs.wp-version }}" != "latest" ]; then - echo "versions=$(jq '.["${{ inputs.wp-version }}"] | @json' version-support-php.json)" >> $GITHUB_OUTPUT + if [ "${{ steps.wp-version.outputs.version }}" != "latest" ]; then + echo "versions=$(jq -r '.["${{ steps.wp-version.outputs.version }}"] | @json' version-support-php.json)" >> $GITHUB_OUTPUT else echo "versions=$(jq -r '.[ (keys[-1]) ] | @json' version-support-php.json)" >> $GITHUB_OUTPUT fi @@ -64,8 +73,8 @@ jobs: - name: Get supported MySQL versions id: mysql-versions run: | - if -n "${{ inputs.wp-version }}" ] && [ "${{ inputs.wp-version }}" != "latest" ]; then - echo "versions=$(jq -r '.["${{ inputs.wp-version }}"] | @json' version-support-mysql.json)" >> $GITHUB_OUTPUT + if [ "${{ steps.wp-version.outputs.version }}" != "latest" ]; then + echo "versions=$(jq -r '.["${{ steps.wp-version.outputs.version }}"] | @json' version-support-mysql.json)" >> $GITHUB_OUTPUT else echo "versions=$(jq -r '.[ (keys[-1]) ] | @json' version-support-mysql.json)" >> $GITHUB_OUTPUT fi @@ -73,8 +82,8 @@ jobs: - name: Get supported MariaDB versions id: mariadb-versions run: | - if -n "${{ inputs.wp-version }}" ] && [ "${{ inputs.wp-version }}" != "latest" ]; then - echo "versions=$(jq -r '.["${{ inputs.wp-version }}"] | @json' version-support-mariadb.json)" >> $GITHUB_OUTPUT + if [ "${{ steps.wp-version.outputs.version }}" != "latest" ]; then + echo "versions=$(jq -r '.["${{ steps.wp-version.outputs.version }}"] | @json' version-support-mariadb.json)" >> $GITHUB_OUTPUT else echo "versions=$(jq -r '.[ (keys[-1]) ] | @json' version-support-mariadb.json)" >> $GITHUB_OUTPUT fi @@ -109,7 +118,15 @@ jobs: image: ${{ matrix.db-type }}:${{ matrix.db-version }} ports: - 3306 - options: --health-cmd="${{ matrix.db-type == 'mysql' && 'mysqladmin' || 'mariadb-admin' }} ping" --health-interval=30s --health-timeout=10s --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-version != '5.5' && ' --default-authentication-plugin=mysql_native_password"' || '' }} + options: >- + --health-cmd="mysqladmin ping" + --health-interval=30s + --health-timeout=10s + --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-version != '5.5' && ' --default-authentication-plugin=mysql_native_password"' || '' }} steps: - name: Set up PHP ${{ matrix.php }} @@ -117,7 +134,7 @@ jobs: with: php-version: '${{ matrix.php }}' coverage: none - tools: wp-cli + tools: wp-cli${{ contains( fromJSON('["5.3", "5.4", "5.5"]'), matrix.php ) && ':2.4.0' || '' }} - name: Start the database server run: | @@ -141,7 +158,7 @@ jobs: # - Creates a `wp-config.php` file. # - Installs WordPress. install-tests-mariadb: - name: WP ${{ inputs.wp-version || 'latest' }} / PHP ${{ matrix.php }} / ${{ 'mariadb' == matrix.db-type && 'MariaDB' || 'MySQL' }} ${{ matrix.db-version }}${{ matrix.multisite && ' multisite' || '' }} / ${{ matrix.os }} + name: WP ${{ inputs.wp-version || 'latest' }} / PHP ${{ matrix.php }} / ${{ 'mariadb' == matrix.db-type && 'MariaDB' || 'MySQL' }} ${{ matrix.db-version }}${{ matrix.multisite && ' multisite' || '' }} permissions: contents: read runs-on: ${{ matrix.os }} @@ -162,7 +179,15 @@ jobs: image: ${{ matrix.db-type }}:${{ matrix.db-version }} ports: - 3306 - options: --health-cmd="mysqladmin ping" --health-interval=30s --health-timeout=10s --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-version != '5.5' && ' --default-authentication-plugin=mysql_native_password"' || '' }} + options: >- + --health-cmd="mariadb-admin ping" + --health-interval=30s + --health-timeout=10s + --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 mariadbd steps: - name: Set up PHP ${{ matrix.php }} @@ -170,7 +195,7 @@ jobs: with: php-version: '${{ matrix.php }}' coverage: none - tools: wp-cli + tools: wp-cli${{ contains( fromJSON('["5.3", "5.4", "5.5"]'), matrix.php ) && ':2.4.0' || '' }} - name: Start the database server run: | From 35a1851ff73c7c19287c3cd9661367e029d5d55e Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Fri, 13 Oct 2023 15:13:10 -0400 Subject: [PATCH 04/21] Remove MariaDB for now. --- .github/workflows/install-testing.yml | 74 +-------------------------- version-support-mariadb.json | 50 ------------------ 2 files changed, 1 insertion(+), 123 deletions(-) delete mode 100644 version-support-mariadb.json diff --git a/.github/workflows/install-testing.yml b/.github/workflows/install-testing.yml index 65d9846dc4b73..a8ec3915dc384 100644 --- a/.github/workflows/install-testing.yml +++ b/.github/workflows/install-testing.yml @@ -36,7 +36,6 @@ jobs: # - Checks out the repository. # - Fetches the versions of PHP to test. # - Fetches the versions of MySQL to test. - # - Fetches the versions of MariaDB to test. build-matrix: name: Determine PHP Versions to test runs-on: ubuntu-latest @@ -44,7 +43,6 @@ jobs: outputs: php-versions: ${{ steps.php-versions.outputs.versions }} mysql-versions: ${{ steps.mysql-versions.outputs.versions }} - mariadb-versions: ${{ steps.mariadb-versions.outputs.versions }} steps: - name: Checkout repository @@ -79,15 +77,6 @@ jobs: echo "versions=$(jq -r '.[ (keys[-1]) ] | @json' version-support-mysql.json)" >> $GITHUB_OUTPUT fi - - name: Get supported MariaDB versions - id: mariadb-versions - run: | - if [ "${{ steps.wp-version.outputs.version }}" != "latest" ]; then - echo "versions=$(jq -r '.["${{ steps.wp-version.outputs.version }}"] | @json' version-support-mariadb.json)" >> $GITHUB_OUTPUT - else - echo "versions=$(jq -r '.[ (keys[-1]) ] | @json' version-support-mariadb.json)" >> $GITHUB_OUTPUT - fi - # Test the WordPress installation process through WP-CLI. # # Performs the following steps: @@ -149,74 +138,13 @@ jobs: - name: Install WordPress run: wp core ${{ matrix.multisite && 'multisite-' || '' }}install --url=http://localhost/ --title="Upgrade Test" --admin_user=admin --admin_password=password --admin_email=me@example.org --skip-email - # Test the WordPress installation process through WP-CLI. - # - # Performs the following steps: - # - Sets up PHP. - # - Starts the database server. - # - Downloads the specified version of WordPress. - # - Creates a `wp-config.php` file. - # - Installs WordPress. - install-tests-mariadb: - name: WP ${{ inputs.wp-version || 'latest' }} / PHP ${{ matrix.php }} / ${{ 'mariadb' == matrix.db-type && 'MariaDB' || 'MySQL' }} ${{ matrix.db-version }}${{ matrix.multisite && ' multisite' || '' }} - permissions: - contents: read - runs-on: ${{ matrix.os }} - timeout-minutes: 10 - needs: [ build-matrix ] - strategy: - fail-fast: false - matrix: - os: [ ubuntu-latest ] - php: ${{ fromJSON( needs.build-matrix.outputs.php-versions ) }} - db-type: [ 'mariadb' ] - db-version: ${{ fromJSON( needs.build-matrix.outputs.mariadb-versions ) }} - multisite: [ false, true ] - memcached: [ false ] - - services: - database: - image: ${{ matrix.db-type }}:${{ matrix.db-version }} - ports: - - 3306 - options: >- - --health-cmd="mariadb-admin ping" - --health-interval=30s - --health-timeout=10s - --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 mariadbd - - steps: - - name: Set up PHP ${{ matrix.php }} - uses: shivammathur/setup-php@7fdd3ece872ec7ec4c098ae5ab7637d5e0a96067 # v2.26.0 - with: - php-version: '${{ matrix.php }}' - coverage: none - tools: wp-cli${{ contains( fromJSON('["5.3", "5.4", "5.5"]'), matrix.php ) && ':2.4.0' || '' }} - - - name: Start the database server - run: | - sudo systemctl start ${{ matrix.db-type }} - - - name: Download WordPress - run: wp core download ${{ inputs.wp-version && 'latest' != inputs.wp-version && format( '--version={0}', inputs.wp-version ) || '' }} - - - name: Create wp-config.php file - run: wp config create --dbname=test_db --dbuser=root --dbpass=root --dbhost=127.0.0.1:${{ job.services.database.ports['3306'] }} - - - name: Install WordPress - run: wp core ${{ matrix.multisite && 'multisite-' || '' }}install --url=http://localhost/ --title="Upgrade Test" --admin_user=admin --admin_password=password --admin_email=me@example.org --skip-email - slack-notifications: name: Slack Notifications uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk permissions: actions: read contents: read - needs: [ install-tests-mysql, install-tests-mariadb ] + needs: [ install-tests-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' }} diff --git a/version-support-mariadb.json b/version-support-mariadb.json deleted file mode 100644 index ce4b762ae77e8..0000000000000 --- a/version-support-mariadb.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "6-3": [ - "11.0", - "10.11", - "10.6", - "10.4" - ], - "6-2": [ - "11.0", - "10.11", - "10.6", - "10.4" - ], - "6-1": [ - "11.0", - "10.11", - "10.6", - "10.4" - ], - "6-0": [ - "11.0", - "10.11", - "10.6", - "10.4" - ], - "5-9": [ - "11.0", - "10.11", - "10.6", - "10.4" - ], - "5-8": [], - "5-7": [], - "5-6": [], - "5-5": [], - "5-4": [], - "5-3": [], - "5-2": [], - "5-1": [], - "5-0": [], - "4-9": [], - "4-8": [], - "4-7": [], - "4-6": [], - "4-5": [], - "4-4": [], - "4-3": [], - "4-2": [], - "4-1": [] -} From 99c6d163e2b7c054d63e1e9d82ba9fbf456a9fd2 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Fri, 20 Oct 2023 13:07:30 -0400 Subject: [PATCH 05/21] Rule out an older version of CLI. --- .github/workflows/install-testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/install-testing.yml b/.github/workflows/install-testing.yml index a8ec3915dc384..13025ffcfb8df 100644 --- a/.github/workflows/install-testing.yml +++ b/.github/workflows/install-testing.yml @@ -123,7 +123,7 @@ jobs: with: php-version: '${{ matrix.php }}' coverage: none - tools: wp-cli${{ contains( fromJSON('["5.3", "5.4", "5.5"]'), matrix.php ) && ':2.4.0' || '' }} + tools: wp-cli${{ contains( fromJSON('["5.4", "5.5"]'), matrix.php ) && ':2.4.0' || '5.3' == matrix.php && ':2.2.0' || '' }} - name: Start the database server run: | From 968723a764e9a9897b93e49660b39e891103a8c2 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Fri, 20 Oct 2023 13:16:08 -0400 Subject: [PATCH 06/21] Exclude PHP 5.3 for now. --- .github/workflows/install-testing.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/install-testing.yml b/.github/workflows/install-testing.yml index 13025ffcfb8df..3bec35694b8df 100644 --- a/.github/workflows/install-testing.yml +++ b/.github/workflows/install-testing.yml @@ -102,6 +102,9 @@ jobs: multisite: [ false, true ] memcached: [ false ] + exclude: + - php: '5.3' + services: database: image: ${{ matrix.db-type }}:${{ matrix.db-version }} @@ -123,7 +126,7 @@ jobs: with: php-version: '${{ matrix.php }}' coverage: none - tools: wp-cli${{ contains( fromJSON('["5.4", "5.5"]'), matrix.php ) && ':2.4.0' || '5.3' == matrix.php && ':2.2.0' || '' }} + tools: wp-cli${{ contains( fromJSON('["5.4", "5.5"]'), matrix.php ) && ':2.4.0' || '' }} - name: Start the database server run: | From 1db9fc5356d2d5bbb1d13da826c31e932162cfa0 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Fri, 20 Oct 2023 13:17:30 -0400 Subject: [PATCH 07/21] Exclude MySQL 8 on PHP 5.4 and 5.5. --- .github/workflows/install-testing.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/install-testing.yml b/.github/workflows/install-testing.yml index 3bec35694b8df..45f398847a1bf 100644 --- a/.github/workflows/install-testing.yml +++ b/.github/workflows/install-testing.yml @@ -104,6 +104,10 @@ jobs: exclude: - php: '5.3' + - php: '5.4' + db-version: '8.0' + - php: '5.5' + db-version: '8.0' services: database: From ff50712efd92a0f7b8af54a0404661123e719d62 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Mon, 23 Oct 2023 13:48:45 -0400 Subject: [PATCH 08/21] Update MySQL version testing. --- .github/workflows/install-testing.yml | 4 -- version-support-mysql.json | 64 ++++++++++++++++++--------- 2 files changed, 43 insertions(+), 25 deletions(-) diff --git a/.github/workflows/install-testing.yml b/.github/workflows/install-testing.yml index 45f398847a1bf..3bec35694b8df 100644 --- a/.github/workflows/install-testing.yml +++ b/.github/workflows/install-testing.yml @@ -104,10 +104,6 @@ jobs: exclude: - php: '5.3' - - php: '5.4' - db-version: '8.0' - - php: '5.5' - db-version: '8.0' services: database: diff --git a/version-support-mysql.json b/version-support-mysql.json index 82e497aae616d..c91cfb2399840 100644 --- a/version-support-mysql.json +++ b/version-support-mysql.json @@ -1,88 +1,110 @@ { "6-3": [ "8.0", - "5.7" + "5.7", + "5.6", + "5.5" ], "6-2": [ "8.0", - "5.7" + "5.7", + "5.6", + "5.5" ], "6-1": [ "8.0", - "5.7" + "5.7", + "5.6", + "5.5" ], "6-0": [ "8.0", - "5.7" + "5.7", + "5.6", + "5.5" ], "5-9": [ "8.0", - "5.7" + "5.7", + "5.6", + "5.5" ], "5-8": [ "8.0", "5.7", - "5.6" + "5.6", + "5.5" ], "5-7": [ "8.0", "5.7", - "5.6" + "5.6", + "5.5" ], "5-6": [ "8.0", "5.7", - "5.6" + "5.6", + "5.5" ], "5-5": [ "8.0", "5.7", - "5.6" + "5.6", + "5.5" ], "5-4": [ "8.0", "5.7", - "5.6" + "5.6", + "5.5" ], "5-3": [ "8.0", "5.7", - "5.6" + "5.6", + "5.5" ], "5-2": [ "8.0", "5.7", - "5.6" + "5.6", + "5.5" ], "5-1": [ - "8.0", "5.7", - "5.6" + "5.6", + "5.5" ], "5-0": [ - "8.0", "5.7", - "5.6" + "5.6", + "5.5" ], "4-9": [ "5.7", - "5.6" + "5.6", + "5.5" ], "4-8": [ "5.7", - "5.6" + "5.6", + "5.5" ], "4-7": [ "5.7", - "5.6" + "5.6", + "5.5" ], "4-6": [ "5.7", - "5.6" + "5.6", + "5.5" ], "4-5": [ "5.7", - "5.6" + "5.6", + "5.5" ], "4-4": [ "5.7", From 223a227d56933112f405130e4506d07cf34abf4a Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Wed, 25 Oct 2023 08:27:10 -0400 Subject: [PATCH 09/21] Remove MySQL 5.5 from the version list. For some reason, the Docker container does not run. --- version-support-mysql.json | 69 +++++++++++++------------------------- 1 file changed, 23 insertions(+), 46 deletions(-) diff --git a/version-support-mysql.json b/version-support-mysql.json index c91cfb2399840..ae772ec0355d7 100644 --- a/version-support-mysql.json +++ b/version-support-mysql.json @@ -2,128 +2,105 @@ "6-3": [ "8.0", "5.7", - "5.6", - "5.5" + "5.6" ], "6-2": [ "8.0", "5.7", - "5.6", - "5.5" + "5.6" ], "6-1": [ "8.0", "5.7", - "5.6", - "5.5" + "5.6" ], "6-0": [ "8.0", "5.7", - "5.6", - "5.5" + "5.6" ], "5-9": [ "8.0", "5.7", - "5.6", - "5.5" + "5.6" ], "5-8": [ "8.0", "5.7", - "5.6", - "5.5" + "5.6" ], "5-7": [ "8.0", "5.7", - "5.6", - "5.5" + "5.6" ], "5-6": [ "8.0", "5.7", - "5.6", - "5.5" + "5.6" ], "5-5": [ "8.0", "5.7", - "5.6", - "5.5" + "5.6" ], "5-4": [ "8.0", "5.7", - "5.6", - "5.5" + "5.6" ], "5-3": [ "8.0", "5.7", - "5.6", - "5.5" + "5.6" ], "5-2": [ "8.0", "5.7", - "5.6", - "5.5" + "5.6" ], "5-1": [ "5.7", - "5.6", - "5.5" + "5.6" ], "5-0": [ "5.7", - "5.6", - "5.5" + "5.6" ], "4-9": [ "5.7", - "5.6", - "5.5" + "5.6" ], "4-8": [ "5.7", - "5.6", - "5.5" + "5.6" ], "4-7": [ "5.7", - "5.6", - "5.5" + "5.6" ], "4-6": [ "5.7", - "5.6", - "5.5" + "5.6" ], "4-5": [ "5.7", - "5.6", - "5.5" + "5.6" ], "4-4": [ "5.7", - "5.6", - "5.5" + "5.6" ], "4-3": [ "5.7", - "5.6", - "5.5" + "5.6" ], "4-2": [ "5.7", - "5.6", - "5.5" + "5.6" ], "4-1": [ "5.7", - "5.6", - "5.5" + "5.6" ] } From d414c1a11247b36357116bc3d97fccd9ec2cfc88 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Tue, 31 Oct 2023 11:03:16 -0400 Subject: [PATCH 10/21] Revert "Remove MySQL 5.5 from the version list." This reverts commit 223a227d56933112f405130e4506d07cf34abf4a. --- version-support-mysql.json | 69 +++++++++++++++++++++++++------------- 1 file changed, 46 insertions(+), 23 deletions(-) diff --git a/version-support-mysql.json b/version-support-mysql.json index ae772ec0355d7..c91cfb2399840 100644 --- a/version-support-mysql.json +++ b/version-support-mysql.json @@ -2,105 +2,128 @@ "6-3": [ "8.0", "5.7", - "5.6" + "5.6", + "5.5" ], "6-2": [ "8.0", "5.7", - "5.6" + "5.6", + "5.5" ], "6-1": [ "8.0", "5.7", - "5.6" + "5.6", + "5.5" ], "6-0": [ "8.0", "5.7", - "5.6" + "5.6", + "5.5" ], "5-9": [ "8.0", "5.7", - "5.6" + "5.6", + "5.5" ], "5-8": [ "8.0", "5.7", - "5.6" + "5.6", + "5.5" ], "5-7": [ "8.0", "5.7", - "5.6" + "5.6", + "5.5" ], "5-6": [ "8.0", "5.7", - "5.6" + "5.6", + "5.5" ], "5-5": [ "8.0", "5.7", - "5.6" + "5.6", + "5.5" ], "5-4": [ "8.0", "5.7", - "5.6" + "5.6", + "5.5" ], "5-3": [ "8.0", "5.7", - "5.6" + "5.6", + "5.5" ], "5-2": [ "8.0", "5.7", - "5.6" + "5.6", + "5.5" ], "5-1": [ "5.7", - "5.6" + "5.6", + "5.5" ], "5-0": [ "5.7", - "5.6" + "5.6", + "5.5" ], "4-9": [ "5.7", - "5.6" + "5.6", + "5.5" ], "4-8": [ "5.7", - "5.6" + "5.6", + "5.5" ], "4-7": [ "5.7", - "5.6" + "5.6", + "5.5" ], "4-6": [ "5.7", - "5.6" + "5.6", + "5.5" ], "4-5": [ "5.7", - "5.6" + "5.6", + "5.5" ], "4-4": [ "5.7", - "5.6" + "5.6", + "5.5" ], "4-3": [ "5.7", - "5.6" + "5.6", + "5.5" ], "4-2": [ "5.7", - "5.6" + "5.6", + "5.5" ], "4-1": [ "5.7", - "5.6" + "5.6", + "5.5" ] } From 8d7edae646db87b6ab23ff5fec69078ef40fc882 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Tue, 31 Oct 2023 11:03:49 -0400 Subject: [PATCH 11/21] Exclude testing MySQL 5.5 for now. --- .github/workflows/install-testing.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/install-testing.yml b/.github/workflows/install-testing.yml index 3bec35694b8df..3f03648c53764 100644 --- a/.github/workflows/install-testing.yml +++ b/.github/workflows/install-testing.yml @@ -104,6 +104,7 @@ jobs: exclude: - php: '5.3' + - db-version: '5.5' services: database: From 981ec82a6318cb716d02073187e5b8e4b019e810 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Tue, 31 Oct 2023 13:34:10 -0400 Subject: [PATCH 12/21] Improving inline docs. --- .github/workflows/install-testing.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/install-testing.yml b/.github/workflows/install-testing.yml index 3f03648c53764..5d82c6582c330 100644 --- a/.github/workflows/install-testing.yml +++ b/.github/workflows/install-testing.yml @@ -1,3 +1,6 @@ +# Confirms that installing WordPress using WP-CLI works successfully. +# +# This workflow is not meant to test wordpress-develop checkouts, but rather tagged versions officially available on WordPress.org. name: Installation Tests on: @@ -59,6 +62,8 @@ jobs: echo "version=latest" >> $GITHUB_OUTPUT fi + # Look up the major version's specific PHP support policy when a version is provided. + # Otherwise, use the current PHP support policy. - name: Get supported PHP versions id: php-versions run: | @@ -68,6 +73,8 @@ jobs: echo "versions=$(jq -r '.[ (keys[-1]) ] | @json' version-support-php.json)" >> $GITHUB_OUTPUT fi + # Look up the major version's specific MySQL support policy when a version is provided. + # Otherwise, use the current MySQL support policy. - name: Get supported MySQL versions id: mysql-versions run: | From a412458367f2631143fff4cc7d8ee7c4e101f882 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Tue, 31 Oct 2023 13:34:21 -0400 Subject: [PATCH 13/21] Test against `nightly` by default. --- .github/workflows/install-testing.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/install-testing.yml b/.github/workflows/install-testing.yml index 5d82c6582c330..c98f07e30642a 100644 --- a/.github/workflows/install-testing.yml +++ b/.github/workflows/install-testing.yml @@ -19,7 +19,7 @@ on: wp-version: description: 'The version to test installing. Accepts major and minor versions, "latest", or "nightly". Major releases must not end with ".0".' type: string - default: 'latest' + default: 'nightly' # Cancels all previous workflow runs for pull requests that have not completed. concurrency: @@ -53,13 +53,13 @@ jobs: with: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} - - name: Determine major WordPress version + - name: Determine the major WordPress version id: wp-version run: | - if [ "${{ inputs.wp-version }}" ] && [ "${{ inputs.wp-version }}" != "latest" ]; then + if [ "${{ inputs.wp-version }}" ] && [ "${{ inputs.wp-version }}" != "nightly" ] && [ "${{ inputs.wp-version }}" != "latest" ]; then echo "version=$(echo "${{ inputs.wp-version }}" | tr '.' '-' | cut -d '-' -f1-2)" >> $GITHUB_OUTPUT else - echo "version=latest" >> $GITHUB_OUTPUT + echo "version=$(echo "${{ inputs.wp-version }}")" >> $GITHUB_OUTPUT fi # Look up the major version's specific PHP support policy when a version is provided. @@ -67,7 +67,7 @@ jobs: - name: Get supported PHP versions id: php-versions run: | - if [ "${{ steps.wp-version.outputs.version }}" != "latest" ]; then + if [ "${{ steps.wp-version.outputs.version }}" != "latest" ] && [ "${{ steps.wp-version.outputs.version }}" != "nightly" ]; then echo "versions=$(jq -r '.["${{ steps.wp-version.outputs.version }}"] | @json' version-support-php.json)" >> $GITHUB_OUTPUT else echo "versions=$(jq -r '.[ (keys[-1]) ] | @json' version-support-php.json)" >> $GITHUB_OUTPUT @@ -78,7 +78,7 @@ jobs: - name: Get supported MySQL versions id: mysql-versions run: | - if [ "${{ steps.wp-version.outputs.version }}" != "latest" ]; then + if [ "${{ steps.wp-version.outputs.version }}" != "latest" ] && [ "${{ steps.wp-version.outputs.version }}" != "nightly" ]; then echo "versions=$(jq -r '.["${{ steps.wp-version.outputs.version }}"] | @json' version-support-mysql.json)" >> $GITHUB_OUTPUT else echo "versions=$(jq -r '.[ (keys[-1]) ] | @json' version-support-mysql.json)" >> $GITHUB_OUTPUT @@ -141,7 +141,7 @@ jobs: sudo systemctl start ${{ matrix.db-type }} - name: Download WordPress - run: wp core download ${{ inputs.wp-version && 'latest' != inputs.wp-version && format( '--version={0}', inputs.wp-version ) || '' }} + run: wp core download ${{ inputs.wp-version && format( '--version={0}', inputs.wp-version ) || '' }} - name: Create wp-config.php file run: wp config create --dbname=test_db --dbuser=root --dbpass=root --dbhost=127.0.0.1:${{ job.services.database.ports['3306'] }} From f446bcfbdbe15321902a5ee56b0b3a7fda911a47 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Tue, 31 Oct 2023 13:38:22 -0400 Subject: [PATCH 14/21] Correct logic for storing WP version. --- .github/workflows/install-testing.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/install-testing.yml b/.github/workflows/install-testing.yml index c98f07e30642a..c040f08efdb0b 100644 --- a/.github/workflows/install-testing.yml +++ b/.github/workflows/install-testing.yml @@ -58,8 +58,10 @@ jobs: run: | if [ "${{ inputs.wp-version }}" ] && [ "${{ inputs.wp-version }}" != "nightly" ] && [ "${{ inputs.wp-version }}" != "latest" ]; then echo "version=$(echo "${{ inputs.wp-version }}" | tr '.' '-' | cut -d '-' -f1-2)" >> $GITHUB_OUTPUT - else + elif [ "${{ inputs.wp-version }}" ] echo "version=$(echo "${{ inputs.wp-version }}")" >> $GITHUB_OUTPUT + else + echo "version=nightly" >> $GITHUB_OUTPUT fi # Look up the major version's specific PHP support policy when a version is provided. From 0678796da71f6edce803e7bab1ed9989e87a6f38 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Tue, 31 Oct 2023 13:40:00 -0400 Subject: [PATCH 15/21] Correct else if syntax. --- .github/workflows/install-testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/install-testing.yml b/.github/workflows/install-testing.yml index c040f08efdb0b..0d9f3fc81254a 100644 --- a/.github/workflows/install-testing.yml +++ b/.github/workflows/install-testing.yml @@ -58,7 +58,7 @@ jobs: run: | if [ "${{ inputs.wp-version }}" ] && [ "${{ inputs.wp-version }}" != "nightly" ] && [ "${{ inputs.wp-version }}" != "latest" ]; then echo "version=$(echo "${{ inputs.wp-version }}" | tr '.' '-' | cut -d '-' -f1-2)" >> $GITHUB_OUTPUT - elif [ "${{ inputs.wp-version }}" ] + elif [ "${{ inputs.wp-version }}" ]; then echo "version=$(echo "${{ inputs.wp-version }}")" >> $GITHUB_OUTPUT else echo "version=nightly" >> $GITHUB_OUTPUT From 23838c5f03ca68161bcee8fb53bb868006cc0f4e Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Tue, 31 Oct 2023 13:47:50 -0400 Subject: [PATCH 16/21] Differentiate between the major version and the full version being passed. --- .github/workflows/install-testing.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/install-testing.yml b/.github/workflows/install-testing.yml index 0d9f3fc81254a..6dd119a910d1e 100644 --- a/.github/workflows/install-testing.yml +++ b/.github/workflows/install-testing.yml @@ -44,6 +44,7 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 5 outputs: + major-wp-version: ${{ steps.major-wp-version.outputs.version }} php-versions: ${{ steps.php-versions.outputs.versions }} mysql-versions: ${{ steps.mysql-versions.outputs.versions }} @@ -54,7 +55,7 @@ jobs: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} - name: Determine the major WordPress version - id: wp-version + id: major-wp-version run: | if [ "${{ inputs.wp-version }}" ] && [ "${{ inputs.wp-version }}" != "nightly" ] && [ "${{ inputs.wp-version }}" != "latest" ]; then echo "version=$(echo "${{ inputs.wp-version }}" | tr '.' '-' | cut -d '-' -f1-2)" >> $GITHUB_OUTPUT @@ -69,8 +70,8 @@ jobs: - name: Get supported PHP versions id: php-versions run: | - if [ "${{ steps.wp-version.outputs.version }}" != "latest" ] && [ "${{ steps.wp-version.outputs.version }}" != "nightly" ]; then - echo "versions=$(jq -r '.["${{ steps.wp-version.outputs.version }}"] | @json' version-support-php.json)" >> $GITHUB_OUTPUT + if [ "${{ steps.major-wp-version.outputs.version }}" != "latest" ] && [ "${{ steps.major-wp-version.outputs.version }}" != "nightly" ]; then + echo "versions=$(jq -r '.["${{ steps.major-wp-version.outputs.version }}"] | @json' version-support-php.json)" >> $GITHUB_OUTPUT else echo "versions=$(jq -r '.[ (keys[-1]) ] | @json' version-support-php.json)" >> $GITHUB_OUTPUT fi @@ -80,8 +81,8 @@ jobs: - name: Get supported MySQL versions id: mysql-versions run: | - if [ "${{ steps.wp-version.outputs.version }}" != "latest" ] && [ "${{ steps.wp-version.outputs.version }}" != "nightly" ]; then - echo "versions=$(jq -r '.["${{ steps.wp-version.outputs.version }}"] | @json' version-support-mysql.json)" >> $GITHUB_OUTPUT + if [ "${{ steps.major-wp-version.outputs.version }}" != "latest" ] && [ "${{ steps.major-wp-version.outputs.version }}" != "nightly" ]; then + echo "versions=$(jq -r '.["${{ steps.major-wp-version.outputs.version }}"] | @json' version-support-mysql.json)" >> $GITHUB_OUTPUT else echo "versions=$(jq -r '.[ (keys[-1]) ] | @json' version-support-mysql.json)" >> $GITHUB_OUTPUT fi From 989ef13d6811aef131ef864d93e58f0465aac26a Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Tue, 31 Oct 2023 13:48:01 -0400 Subject: [PATCH 17/21] Some bugs related to switching to `nightly` as the default. --- .github/workflows/install-testing.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/install-testing.yml b/.github/workflows/install-testing.yml index 6dd119a910d1e..05da326ea125e 100644 --- a/.github/workflows/install-testing.yml +++ b/.github/workflows/install-testing.yml @@ -96,7 +96,7 @@ jobs: # - Creates a `wp-config.php` file. # - Installs WordPress. install-tests-mysql: - name: WP ${{ inputs.wp-version || 'latest' }} / PHP ${{ matrix.php }} / ${{ 'mariadb' == matrix.db-type && 'MariaDB' || 'MySQL' }} ${{ matrix.db-version }}${{ matrix.multisite && ' multisite' || '' }} + name: WP ${{ inputs.wp-version || 'nightly' }} / PHP ${{ matrix.php }} / ${{ 'mariadb' == matrix.db-type && 'MariaDB' || 'MySQL' }} ${{ matrix.db-version }}${{ matrix.multisite && ' multisite' || '' }} permissions: contents: read runs-on: ${{ matrix.os }} @@ -144,7 +144,7 @@ jobs: sudo systemctl start ${{ matrix.db-type }} - name: Download WordPress - run: wp core download ${{ inputs.wp-version && format( '--version={0}', inputs.wp-version ) || '' }} + run: wp core download ${{ inputs.wp-version && format( '--version={0}', inputs.wp-version ) || '--version=nightly' }} - name: Create wp-config.php file run: wp config create --dbname=test_db --dbuser=root --dbpass=root --dbhost=127.0.0.1:${{ job.services.database.ports['3306'] }} From d8b8a14f93c642ccd4355c37c1f7635898eec38c Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Tue, 31 Oct 2023 13:51:49 -0400 Subject: [PATCH 18/21] Improve the concurrency group. This should prevent instances where multiple versions are tested simultaneously from cancelling each other. --- .github/workflows/install-testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/install-testing.yml b/.github/workflows/install-testing.yml index 05da326ea125e..9b9803ee7e108 100644 --- a/.github/workflows/install-testing.yml +++ b/.github/workflows/install-testing.yml @@ -25,7 +25,7 @@ on: concurrency: # The concurrency group contains the workflow name and the branch name for pull requests # or the commit hash for any other events. - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} + group: ${{ github.workflow }}-${{ inputs.wp-version || github.event_name == 'pull_request' && github.head_ref || github.sha }} cancel-in-progress: true # Disable permissions for all available scopes by default. From f25a9018a66e20d553ceea884012c1654dcdb324 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Tue, 31 Oct 2023 14:09:04 -0400 Subject: [PATCH 19/21] Add a once a week schedule event. --- .github/workflows/install-testing.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/install-testing.yml b/.github/workflows/install-testing.yml index 9b9803ee7e108..1e58578b36efe 100644 --- a/.github/workflows/install-testing.yml +++ b/.github/workflows/install-testing.yml @@ -14,6 +14,8 @@ on: # Always test the workflow when changes are suggested. paths: - '.github/workflows/install-testing.yml' + schedule: + - cron: '0 0 * * 1' workflow_dispatch: inputs: wp-version: From 019da24932ed1f964ad47f03baa1ffef521ea312 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Thu, 21 Dec 2023 14:39:25 -0500 Subject: [PATCH 20/21] Add PHP 5.2 and MySQL 5.0, 5.1 to the supports file. --- .github/workflows/install-testing.yml | 4 + version-support-mysql.json | 103 ++++++++++++++++++++------ version-support-php.json | 11 +++ 3 files changed, 96 insertions(+), 22 deletions(-) diff --git a/.github/workflows/install-testing.yml b/.github/workflows/install-testing.yml index fa864b11f6f37..4c6b8f6c8cde6 100644 --- a/.github/workflows/install-testing.yml +++ b/.github/workflows/install-testing.yml @@ -114,8 +114,12 @@ jobs: multisite: [ false, true ] memcached: [ false ] + # Exclude some PHP and MySQL versions that cannot currently be tested with Docker containers. exclude: + - php: '5.2' - php: '5.3' + - db-version: '5.0' + - db-version: '5.1' - db-version: '5.5' services: diff --git a/version-support-mysql.json b/version-support-mysql.json index c91cfb2399840..7cb068ba5c0c1 100644 --- a/version-support-mysql.json +++ b/version-support-mysql.json @@ -1,75 +1,114 @@ { - "6-3": [ + "6-5": [ + "8.2", "8.0", "5.7", "5.6", "5.5" ], + "6-4": [ + "8.0", + "5.7", + "5.6", + "5.5", + "5.1", + "5.0" + ], + "6-3": [ + "8.0", + "5.7", + "5.6", + "5.5", + "5.1", + "5.0" + ], "6-2": [ "8.0", "5.7", "5.6", - "5.5" + "5.5", + "5.1", + "5.0" ], "6-1": [ "8.0", "5.7", "5.6", - "5.5" + "5.5", + "5.1", + "5.0" ], "6-0": [ "8.0", "5.7", "5.6", - "5.5" + "5.5", + "5.1", + "5.0" ], "5-9": [ "8.0", "5.7", "5.6", - "5.5" + "5.5", + "5.1", + "5.0" ], "5-8": [ "8.0", "5.7", "5.6", - "5.5" + "5.5", + "5.1", + "5.0" ], "5-7": [ "8.0", "5.7", "5.6", - "5.5" + "5.5", + "5.1", + "5.0" ], "5-6": [ "8.0", "5.7", "5.6", - "5.5" + "5.5", + "5.1", + "5.0" ], "5-5": [ "8.0", "5.7", "5.6", - "5.5" + "5.5", + "5.1", + "5.0" ], "5-4": [ "8.0", "5.7", "5.6", - "5.5" + "5.5", + "5.1", + "5.0" ], "5-3": [ "8.0", "5.7", "5.6", - "5.5" + "5.5", + "5.1", + "5.0" ], "5-2": [ "8.0", "5.7", "5.6", - "5.5" + "5.5", + "5.1", + "5.0" ], "5-1": [ "5.7", @@ -79,51 +118,71 @@ "5-0": [ "5.7", "5.6", - "5.5" + "5.5", + "5.1", + "5.0" ], "4-9": [ "5.7", "5.6", - "5.5" + "5.5", + "5.1", + "5.0" ], "4-8": [ "5.7", "5.6", - "5.5" + "5.5", + "5.1", + "5.0" ], "4-7": [ "5.7", "5.6", - "5.5" + "5.5", + "5.1", + "5.0" ], "4-6": [ "5.7", "5.6", - "5.5" + "5.5", + "5.1", + "5.0" ], "4-5": [ "5.7", "5.6", - "5.5" + "5.5", + "5.1", + "5.0" ], "4-4": [ "5.7", "5.6", - "5.5" + "5.5", + "5.1", + "5.0" ], "4-3": [ "5.7", "5.6", - "5.5" + "5.5", + "5.1", + "5.0" ], "4-2": [ "5.7", "5.6", - "5.5" + "5.5", + "5.1", + "5.0" ], "4-1": [ "5.7", "5.6", - "5.5" + "5.5", + "5.1", + "5.0" ] } diff --git a/version-support-php.json b/version-support-php.json index 54ce28dbf6ad9..48bff25d2fe0d 100644 --- a/version-support-php.json +++ b/version-support-php.json @@ -111,6 +111,7 @@ "7.3" ], "5-1": [ + "5.2", "5.3", "5.4", "5.5", @@ -121,6 +122,7 @@ "7.3" ], "5-0": [ + "5.2", "5.3", "5.4", "5.5", @@ -131,6 +133,7 @@ "7.3" ], "4-9": [ + "5.2", "5.3", "5.4", "5.5", @@ -140,6 +143,7 @@ "7.2" ], "4-8": [ + "5.2", "5.3", "5.4", "5.5", @@ -148,6 +152,7 @@ "7.1" ], "4-7": [ + "5.2", "5.3", "5.4", "5.5", @@ -156,6 +161,7 @@ "7.1" ], "4-6": [ + "5.2", "5.3", "5.4", "5.5", @@ -163,6 +169,7 @@ "7.0" ], "4-5": [ + "5.2", "5.3", "5.4", "5.5", @@ -170,6 +177,7 @@ "7.0" ], "4-4": [ + "5.2", "5.3", "5.4", "5.5", @@ -177,18 +185,21 @@ "7.0" ], "4-3": [ + "5.2", "5.3", "5.4", "5.5", "5.6" ], "4-2": [ + "5.2", "5.3", "5.4", "5.5", "5.6" ], "4-1": [ + "5.2", "5.3", "5.4", "5.5", From bf5708dc8138ccbfccf550119fc49684a9041ebf Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Thu, 21 Dec 2023 14:40:26 -0500 Subject: [PATCH 21/21] Make the support files hidden. --- .github/workflows/install-testing.yml | 8 ++++---- version-support-mysql.json => .version-support-mysql.json | 0 version-support-php.json => .version-support-php.json | 0 3 files changed, 4 insertions(+), 4 deletions(-) rename version-support-mysql.json => .version-support-mysql.json (100%) rename version-support-php.json => .version-support-php.json (100%) diff --git a/.github/workflows/install-testing.yml b/.github/workflows/install-testing.yml index 4c6b8f6c8cde6..b9e8612e4c3b1 100644 --- a/.github/workflows/install-testing.yml +++ b/.github/workflows/install-testing.yml @@ -73,9 +73,9 @@ jobs: id: php-versions run: | if [ "${{ steps.major-wp-version.outputs.version }}" != "latest" ] && [ "${{ steps.major-wp-version.outputs.version }}" != "nightly" ]; then - echo "versions=$(jq -r '.["${{ steps.major-wp-version.outputs.version }}"] | @json' version-support-php.json)" >> $GITHUB_OUTPUT + echo "versions=$(jq -r '.["${{ steps.major-wp-version.outputs.version }}"] | @json' .version-support-php.json)" >> $GITHUB_OUTPUT else - echo "versions=$(jq -r '.[ (keys[-1]) ] | @json' version-support-php.json)" >> $GITHUB_OUTPUT + echo "versions=$(jq -r '.[ (keys[-1]) ] | @json' .version-support-php.json)" >> $GITHUB_OUTPUT fi # Look up the major version's specific MySQL support policy when a version is provided. @@ -84,9 +84,9 @@ jobs: id: mysql-versions run: | if [ "${{ steps.major-wp-version.outputs.version }}" != "latest" ] && [ "${{ steps.major-wp-version.outputs.version }}" != "nightly" ]; then - echo "versions=$(jq -r '.["${{ steps.major-wp-version.outputs.version }}"] | @json' version-support-mysql.json)" >> $GITHUB_OUTPUT + echo "versions=$(jq -r '.["${{ steps.major-wp-version.outputs.version }}"] | @json' .version-support-mysql.json)" >> $GITHUB_OUTPUT else - echo "versions=$(jq -r '.[ (keys[-1]) ] | @json' version-support-mysql.json)" >> $GITHUB_OUTPUT + echo "versions=$(jq -r '.[ (keys[-1]) ] | @json' .version-support-mysql.json)" >> $GITHUB_OUTPUT fi # Test the WordPress installation process through WP-CLI. diff --git a/version-support-mysql.json b/.version-support-mysql.json similarity index 100% rename from version-support-mysql.json rename to .version-support-mysql.json diff --git a/version-support-php.json b/.version-support-php.json similarity index 100% rename from version-support-php.json rename to .version-support-php.json