Skip to content

Commit 78975af

Browse files
committed
Some clean up
1 parent 7483948 commit 78975af

1 file changed

Lines changed: 24 additions & 62 deletions

File tree

.github/workflows/upgrade-testing.yml

Lines changed: 24 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,22 @@ on:
2929
env:
3030
CURRENTLY_SUPPORTED_BRANCH: '6.8'
3131
OLDEST_SECURITY_BRANCH: '4.7'
32+
# 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.
33+
# MySQL 9.0+ will also not work on PHP 7.2 & 7.3. See https://core.trac.wordpress.org/ticket/61218.
34+
DEFAULT_EXCLUSIONS: '[
35+
{ "php": "7.2","db-version": "8.4" },
36+
{ "php": "7.3","db-version": "8.4" },
37+
{ "php": "7.2","db-version": "9.4" },
38+
{ "php": "7.3","db-version": "9.4" },
39+
{ "db-version": "5.0" },
40+
{ "db-version": "5.1" },
41+
{ "db-version": "5.5" },
42+
{ "db-version": "9.0" },
43+
{ "db-version": "9.1" },
44+
{ "db-version": "9.2" },
45+
{ "db-version": "9.3" },
46+
{ "db-version": "9.4" },
47+
]'
3248

3349
# Cancels all previous workflow runs for pull requests that have not completed.
3450
concurrency:
@@ -42,7 +58,7 @@ concurrency:
4258
permissions: {}
4359

4460
# Because the number of jobs spawned can quickly balloon out of control, the following methodology is applied when
45-
# building out the matrix below:
61+
# building out the test matrix for push events:
4662
#
4763
# - The two most recent releases of WordPress are tested against all PHP/MySQL LTS version combinations and the
4864
# most recent innovation release.
@@ -60,11 +76,15 @@ permissions: {}
6076
# modern architectures.
6177
# - 5.6.x Docker containers are available and work, but 5.6 only accounts for ~2.3% of installs as of 12/6/2024.defaults:
6278
# - 5.7.x accounts for ~20% of installs, so this is used below instead.
79+
#
80+
# When a workflow_dispatch event occurs, testing stops at the major version branch of the version specified. For
81+
# example, if the value of inputs.new-version is 6.4.4, the jobs testing versions 6.5 and higher will be skipped because
82+
# that would be a downgrade test.
6383
jobs:
6484
generate-exclusions:
65-
name: Generate test exclusions
85+
name: Create combination exclusion list
6686
runs-on: 'ubuntu-24.04'
67-
if: ${{ true || github.repository == 'WordPress/wordpress-develop' }}
87+
if: ${{ github.repository == 'WordPress/wordpress-develop' }}
6888
timeout-minutes: 5
6989
outputs:
7090
matrix_exclusions: ${{ steps.set-exclusions.outputs.matrix_exclusions }}
@@ -77,23 +97,6 @@ jobs:
7797
env:
7898
NEW_VERSION: ${{ inputs.new-version && inputs.new-version || '6.4.1' }}
7999
run: |
80-
# 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.
81-
# MySQL 9.0+ will also not work on PHP 7.2 & 7.3. See https://core.trac.wordpress.org/ticket/61218.
82-
DEFAULT_EXCLUSIONS='[
83-
{"php":"7.2","db-version":"8.4"},
84-
{"php":"7.3","db-version":"8.4"},
85-
{"php":"7.2","db-version":"9.4"},
86-
{"php":"7.3","db-version":"9.4"},
87-
{"db-version":"5.0"},
88-
{"db-version":"5.1"},
89-
{"db-version":"5.5"},
90-
{"db-version":"9.0"},
91-
{"db-version":"9.1"},
92-
{"db-version":"9.2"},
93-
{"db-version":"9.3"},
94-
{"db-version":"9.4"},
95-
]'
96-
97100
# The defaults are sufficient when not testing a specific version.
98101
if [[ -z "$NEW_VERSION" ]] || \
99102
[[ "$NEW_VERSION" == "latest" ]] || \
@@ -144,47 +147,6 @@ jobs:
144147
145148
echo "matrix_exclusions=$(echo "${DEFAULT_EXCLUSIONS%]}${GENERATED_EXCLUSIONS}" | tr -d '\n' | tr -d ' ')" >> "$GITHUB_OUTPUT"
146149
147-
# The full list of combinations for a specified version should always be tested.
148-
#
149-
# Since all supported combinations are already tested for the WordPress versions listed in the upgrade-tests-recent-releases
150-
# job, those versions should be excluded here to avoid duplicate testing.
151-
generate-matrix-for-input-version:
152-
name: Build Test Matrix for Input Version
153-
uses: ./.github/workflows/reusable-support-json-reader-v1.yml
154-
needs: [ 'generate-exclusions' ]
155-
permissions:
156-
contents: read
157-
if: ${{ true || github.repository == 'WordPress/wordpress-develop' && github.event_name == 'workflow_dispatch' && ! contains( fromJSON('["6.7", "6.8"]'), needs.generate-exclusions.outputs.major_version ) }}
158-
with:
159-
wp-version: ${{ needs.generate-exclusions.outputs.major_version }}
160-
161-
upgrade-tests-input-version:
162-
name: ${{ matrix.wp }} to ${{ inputs.new-version && inputs.new-version || '6.4.1' }}
163-
uses: ./.github/workflows/reusable-upgrade-testing.yml
164-
if: ${{ github.repository == 'WordPress/wordpress-develop' }}
165-
needs: [ 'generate-exclusions', 'generate-matrix-for-input-version' ]
166-
permissions:
167-
contents: read
168-
strategy:
169-
fail-fast: false
170-
matrix:
171-
os: [ 'ubuntu-24.04' ]
172-
php: ${{ fromJSON( needs.generate-matrix-for-input-version.outputs.php-versions ) }}
173-
db-type: [ 'mysql' ]
174-
db-version: ${{ fromJSON( needs.generate-matrix-for-input-version.outputs.mysql-versions ) }}
175-
wp: [ '${{ needs.generate-exclusions.outputs.major_version }}' ]
176-
multisite: [ false, true ]
177-
178-
exclude: ${{ fromJSON( needs.generate-exclusions.outputs.matrix_exclusions ) || '[]' }}
179-
with:
180-
os: ${{ matrix.os }}
181-
php: ${{ matrix.php }}
182-
db-type: ${{ matrix.db-type }}
183-
db-version: ${{ matrix.db-version }}
184-
wp: ${{ matrix.wp }}
185-
new-version: ${{ inputs.new-version && inputs.new-version || '6.4.1' }}
186-
multisite: ${{ matrix.multisite }}
187-
188150
# Tests the full list of PHP/MySQL combinations for the two most recent versions of WordPress.
189151
upgrade-tests-recent-releases:
190152
name: ${{ matrix.wp }} to ${{ inputs.new-version && inputs.new-version || '6.4.1' }}
@@ -340,7 +302,7 @@ jobs:
340302
permissions:
341303
actions: read
342304
contents: read
343-
needs: [ generate-exclusions, upgrade-tests-recent-releases, upgrade-tests-input-version, upgrade-tests-wp-6x-mysql, upgrade-tests-wp-5x-php-7x-mysql, upgrade-tests-wp-5x-php-8x-mysql, upgrade-tests-oldest-wp-mysql ]
305+
needs: [ generate-exclusions, upgrade-tests-recent-releases, upgrade-tests-wp-6x-mysql, upgrade-tests-wp-5x-php-7x-mysql, upgrade-tests-wp-5x-php-8x-mysql, upgrade-tests-oldest-wp-mysql ]
344306
if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
345307
with:
346308
calling_status: ${{ contains( needs.*.result, 'cancelled' ) && 'cancelled' || contains( needs.*.result, 'failure' ) && 'failure' || 'success' }}

0 commit comments

Comments
 (0)