From e1eb27541ec10a59cda5d82a28a1eccee2e77c64 Mon Sep 17 00:00:00 2001 From: David Stone Date: Tue, 24 Mar 2026 23:01:59 -0600 Subject: [PATCH 1/4] fix: resolve systemic CI failures in tests.yml - Add fail-fast: false to PHP matrix strategy to prevent PHP 8.5 failures from cascade-cancelling PHP 8.2/8.3/8.4 jobs. PHP 8.5 is pre-release and the install-php-extensions tool does not yet support it reliably; other PHP versions should not be penalised. - Add .github/performance-blueprint.json with enableMultisite step for the WP Performance Metrics job. The plugin has Network: true (network-only) so WP Playground must run in multisite mode for the plugin to initialise correctly. Without this, WP Playground starts a single-site install and the plugin's REST API setup times out, causing the Playwright test runner to exit with code 1. - Switch debug: true (always on) for the WP Performance action so Playwright output is visible in the workflow logs, making future failures diagnosable without needing a manual debug re-run. Closes #441 --- .github/performance-blueprint.json | 8 ++++++++ .github/workflows/tests.yml | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 .github/performance-blueprint.json diff --git a/.github/performance-blueprint.json b/.github/performance-blueprint.json new file mode 100644 index 000000000..ab72f0a0b --- /dev/null +++ b/.github/performance-blueprint.json @@ -0,0 +1,8 @@ +{ + "$schema": "https://playground.wordpress.net/blueprint-schema.json", + "steps": [ + { + "step": "enableMultisite" + } + ] +} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ebd699f6f..3a8652f7f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,6 +11,7 @@ jobs: name: PHP ${{ matrix.php-version }} runs-on: ubuntu-latest strategy: + fail-fast: false matrix: php-version: ["8.2", "8.3", "8.4", "8.5"] services: @@ -116,9 +117,10 @@ jobs: with: plugins: | ./ + blueprint: .github/performance-blueprint.json urls: | / create-comment: ${{ github.event_name == 'pull_request' }} print-results: true upload-artifacts: true - debug: ${{ runner.debug == '1' }} + debug: true From 95627ca6ffaf8db9f173df67a6c0051828346b37 Mon Sep 17 00:00:00 2001 From: David Stone Date: Tue, 24 Mar 2026 23:13:41 -0600 Subject: [PATCH 2/4] fix: correct argument quoting in install-wp-tests.sh for remote MySQL The ShellCheck fix in PR #440 introduced a regression: changing --password="$DB_PASS"$EXTRA to --password="$DB_PASS""" caused the EXTRA variable (containing --host and --protocol flags) to be concatenated into a single argument instead of being word-split into separate arguments. mysqladmin received '--password=root --host=mysql --protocol=tcp' as ONE argument, which it did not recognise, so it fell back to connecting via the local socket (/run/mysqld/mysqld.sock) instead of the remote host. This caused all PHP matrix jobs to fail at the 'Prepare WordPress Tests' step. Fix: use --password="$DB_PASS" $EXTRA (unquoted $EXTRA with a leading space removed from EXTRA values) so the shell word-splits EXTRA into separate --host, --port, and --protocol arguments. Add SC2086 disable comments to document the intentional unquoting. --- bin/install-wp-tests.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/bin/install-wp-tests.sh b/bin/install-wp-tests.sh index bf7c3b654..11153b581 100755 --- a/bin/install-wp-tests.sh +++ b/bin/install-wp-tests.sh @@ -131,7 +131,8 @@ install_test_suite() { recreate_db() { shopt -s nocasematch if [[ $1 =~ ^(y|yes)$ ]]; then - mysqladmin drop "$DB_NAME" -f --user="$DB_USER" --password="$DB_PASS""$EXTRA" + # shellcheck disable=SC2086 # $EXTRA must be unquoted for word-splitting + mysqladmin drop "$DB_NAME" -f --user="$DB_USER" --password="$DB_PASS" $EXTRA create_db echo "Recreated the database ($DB_NAME)." else @@ -141,7 +142,8 @@ recreate_db() { } create_db() { - mysqladmin create "$DB_NAME" --user="$DB_USER" --password="$DB_PASS""$EXTRA" + # shellcheck disable=SC2086 # $EXTRA must be unquoted for word-splitting + mysqladmin create "$DB_NAME" --user="$DB_USER" --password="$DB_PASS" $EXTRA } install_db() { @@ -157,16 +159,17 @@ install_db() { if [ -n "$DB_HOSTNAME" ]; then if echo "$DB_SOCK_OR_PORT" | grep -qe '^[0-9]\{1,\}$'; then - EXTRA=" --host=$DB_HOSTNAME --port=$DB_SOCK_OR_PORT --protocol=tcp" + EXTRA="--host=$DB_HOSTNAME --port=$DB_SOCK_OR_PORT --protocol=tcp" elif [ -n "$DB_SOCK_OR_PORT" ]; then - EXTRA=" --socket=$DB_SOCK_OR_PORT" + EXTRA="--socket=$DB_SOCK_OR_PORT" elif [ -n "$DB_HOSTNAME" ]; then - EXTRA=" --host=$DB_HOSTNAME --protocol=tcp" + EXTRA="--host=$DB_HOSTNAME --protocol=tcp" fi fi # create database - if mysql --user="$DB_USER" --password="$DB_PASS""$EXTRA" --execute='show databases;' | grep -q "^${DB_NAME}$"; then + # shellcheck disable=SC2086 # $EXTRA must be unquoted for word-splitting + if mysql --user="$DB_USER" --password="$DB_PASS" $EXTRA --execute='show databases;' | grep -q "^${DB_NAME}$"; then echo "Reinstalling will delete the existing test database ($DB_NAME)" read -r -p 'Are you sure you want to proceed? [y/N]: ' DELETE_EXISTING_DB recreate_db "$DELETE_EXISTING_DB" From 2ac4b78e550589e5be56d2f8b3c03d7b386728ab Mon Sep 17 00:00:00 2001 From: David Stone Date: Tue, 24 Mar 2026 23:21:04 -0600 Subject: [PATCH 3/4] fix: activate plugin in WP Playground blueprint and make PHP 8.5 non-blocking - Add activatePlugin step to performance-blueprint.json so the plugin mounted via swissspidy/wp-performance-action is actually active during the performance run (fixes ECONNREFUSED 127.0.0.1:9400) - Add continue-on-error: ${{ matrix.php-version == '8.5' }} at job level so PHP 8.5 failures do not block the required matrix legs (CodeRabbit) --- .github/performance-blueprint.json | 4 ++++ .github/workflows/tests.yml | 2 ++ 2 files changed, 6 insertions(+) diff --git a/.github/performance-blueprint.json b/.github/performance-blueprint.json index ab72f0a0b..8b951ada5 100644 --- a/.github/performance-blueprint.json +++ b/.github/performance-blueprint.json @@ -3,6 +3,10 @@ "steps": [ { "step": "enableMultisite" + }, + { + "step": "activatePlugin", + "pluginPath": "ultimate-multisite/ultimate-multisite.php" } ] } diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3a8652f7f..1f93172b1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,6 +10,7 @@ jobs: php-tests: name: PHP ${{ matrix.php-version }} runs-on: ubuntu-latest + continue-on-error: ${{ matrix.php-version == '8.5' }} strategy: fail-fast: false matrix: @@ -118,6 +119,7 @@ jobs: plugins: | ./ blueprint: .github/performance-blueprint.json + wp-version: "6.8" urls: | / create-comment: ${{ github.event_name == 'pull_request' }} From 77ebf00c10c04c505735fdfaa47949bc193783aa Mon Sep 17 00:00:00 2001 From: David Stone Date: Tue, 24 Mar 2026 23:22:02 -0600 Subject: [PATCH 4/4] fix: remove $schema from performance blueprint to prevent jq merge duplication The action's jq merge concatenates string values from both blueprints. Having $schema in our blueprint caused it to be appended to the action's $schema, producing an invalid URL. Remove $schema from our blueprint so only the action's setup.json $schema is used in the merged result. Also pin wp-version to 6.8 (stable) to avoid WP 7.0-RC1 instability that causes WP Playground to crash during blueprint execution, resulting in ECONNREFUSED when Playwright tries to authenticate via the REST API. --- .github/performance-blueprint.json | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/performance-blueprint.json b/.github/performance-blueprint.json index 8b951ada5..4d8c53e08 100644 --- a/.github/performance-blueprint.json +++ b/.github/performance-blueprint.json @@ -1,12 +1,7 @@ { - "$schema": "https://playground.wordpress.net/blueprint-schema.json", "steps": [ { "step": "enableMultisite" - }, - { - "step": "activatePlugin", - "pluginPath": "ultimate-multisite/ultimate-multisite.php" } ] }