From a73779b26fb0b37852417dfea933689f7ed14a19 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Fri, 27 Mar 2026 15:06:51 +0100 Subject: [PATCH 01/20] Run tests against Windows & macOS --- .github/workflows/reusable-testing.yml | 17 ++++++++++++----- .github/workflows/testing.yml | 26 ++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 5 deletions(-) diff --git a/.github/workflows/reusable-testing.yml b/.github/workflows/reusable-testing.yml index bb0f4a3f..a4d09b51 100644 --- a/.github/workflows/reusable-testing.yml +++ b/.github/workflows/reusable-testing.yml @@ -21,11 +21,15 @@ on: use-phar: type: boolean required: true + os: + type: string + required: false + default: 'ubuntu-22.04' jobs: run-test: - name: WP ${{ inputs.wp }} | PHP ${{ inputs.php }} | ${{ inputs.dbtype == 'sqlite' && 'SQLite' || inputs.dbtype == 'mysql' && 'MySQL' || 'MariaDB' }}${{ inputs.use-phar && ' (Phar)' || '' }}${{ inputs.object_cache == 'sqlite' && ' (Obj Cache)' || '' }} - runs-on: ubuntu-22.04 + name: WP ${{ inputs.wp }} | PHP ${{ inputs.php }} | ${{ inputs.dbtype == 'sqlite' && 'SQLite' || inputs.dbtype == 'mysql' && 'MySQL' || 'MariaDB' }}${{ inputs.use-phar && ' (Phar)' || '' }}${{ inputs.object_cache == 'sqlite' && ' (Obj Cache)' || '' }}${{ startsWith( inputs.os, 'windows' ) && ' (Windows)' || '' }}${{ startsWith( inputs.os, 'macos' ) && ' (macOS)' || '' }} + runs-on: ${{ inputs.os || 'ubuntu-22.04' }} continue-on-error: ${{ inputs.dbtype == 'sqlite' || inputs.object_cache == 'sqlite' }} env: @@ -45,10 +49,11 @@ jobs: - name: Check existence of composer.json & behat.yml files id: check_files + shell: bash run: echo "files_exists=$([ -f composer.json ] && [ -f behat.yml ] && echo true || echo false)" >> "$GITHUB_OUTPUT" - name: Install Ghostscript - if: steps.check_files.outputs.files_exists == 'true' + if: steps.check_files.outputs.files_exists == 'true' && (inputs.os == 'ubuntu-22.04' || inputs.os == '') run: | sudo apt-get update sudo apt-get install ghostscript -y @@ -69,7 +74,7 @@ jobs: COMPOSER_ROOT_VERSION: dev-${{ github.event.repository.default_branch }} - name: Change ImageMagick policy to allow pdf->png conversion. - if: steps.check_files.outputs.files_exists == 'true' + if: steps.check_files.outputs.files_exists == 'true' && (inputs.os == 'ubuntu-22.04' || inputs.os == '') run: | sudo sed -i 's/^.*policy.*coder.*none.*PDF.*//' /etc/ImageMagick-6/policy.xml @@ -92,6 +97,7 @@ jobs: - name: Conditionally use Phar instead of source if: steps.check_files.outputs.files_exists == 'true' && inputs.use-phar == true + shell: bash run: echo "TEST_PHAR=nightly" >> $GITHUB_ENV - name: Check Behat environment @@ -100,7 +106,8 @@ jobs: WP_VERSION: '${{ inputs.wp }}' WP_CLI_TEST_DBTYPE: ${{ inputs.dbtype }} WP_CLI_TEST_DBSOCKET: '${{ steps.setup-mysql.outputs.base-dir }}/tmp/mysql.sock' - run: WP_CLI_TEST_DEBUG_BEHAT_ENV=1 composer behat + WP_CLI_TEST_DEBUG_BEHAT_ENV: 1 + run: composer behat - name: Run Behat if: steps.check_files.outputs.files_exists == 'true' diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 14128761..05a03ee5 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -22,6 +22,7 @@ jobs: dbtype: ['mysql', 'sqlite'] object_cache: ['none', 'sqlite'] use-phar: [false, true] + os: ['ubuntu-22.04', 'macos-latest', 'windows-latest'] test-package: - wp-cli-bundle - wp-cli @@ -83,6 +84,30 @@ jobs: - php: '7.2' wp: trunk + # Only run one macos combination: php: 8.5, wp: latest, dbtype: sqlite, object_cache: none, use-phar: false + - os: macos-latest + php: '7.2' + - os: macos-latest + wp: trunk + - os: macos-latest + dbtype: mysql + - os: macos-latest + object_cache: sqlite + - os: macos-latest + use-phar: true + + # Only run one windows combination: php: 8.5, wp: latest, dbtype: sqlite, object_cache: none, use-phar: false + - os: windows-latest + php: '7.2' + - os: windows-latest + wp: trunk + - os: windows-latest + dbtype: mysql + - os: windows-latest + object_cache: sqlite + - os: windows-latest + use-phar: true + uses: ./.github/workflows/reusable-testing.yml with: test-package: ${{ matrix.test-package }} @@ -91,4 +116,5 @@ jobs: dbtype: ${{ matrix.dbtype }} object_cache: ${{ matrix.object_cache }} use-phar: ${{ matrix.use-phar }} + os: ${{ matrix.os }} From 8a45643f1c7fe404747dcdd7605f649039a6b6bd Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Fri, 27 Mar 2026 15:36:36 +0100 Subject: [PATCH 02/20] Update matrix --- .github/workflows/testing.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 05a03ee5..bd3b1294 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -84,7 +84,7 @@ jobs: - php: '7.2' wp: trunk - # Only run one macos combination: php: 8.5, wp: latest, dbtype: sqlite, object_cache: none, use-phar: false + # Only run one macos combination: php: 8.5, wp: latest, dbtype: sqlite, object_cache: none, use-phar: true - os: macos-latest php: '7.2' - os: macos-latest @@ -94,9 +94,9 @@ jobs: - os: macos-latest object_cache: sqlite - os: macos-latest - use-phar: true + use-phar: false - # Only run one windows combination: php: 8.5, wp: latest, dbtype: sqlite, object_cache: none, use-phar: false + # Only run one windows combination: php: 8.5, wp: latest, dbtype: sqlite, object_cache: none, use-phar: true - os: windows-latest php: '7.2' - os: windows-latest @@ -106,7 +106,7 @@ jobs: - os: windows-latest object_cache: sqlite - os: windows-latest - use-phar: true + use-phar: false uses: ./.github/workflows/reusable-testing.yml with: From 93c045e09f9c97fd15095902026d3509267af07d Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Fri, 27 Mar 2026 15:46:35 +0100 Subject: [PATCH 03/20] Use cURL --- bin/test-phar | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/test-phar b/bin/test-phar index 591a7a6d..fe551827 100755 --- a/bin/test-phar +++ b/bin/test-phar @@ -75,9 +75,9 @@ for RELEASE in $RELEASES; do # Download binary and verify MD5 checksum. BIN_FOLDER="$(mktemp -d)" - wget -O "${BIN_FOLDER}/wp-cli.phar.md5" "$MD5_URL" + curl -sLo "${BIN_FOLDER}/wp-cli.phar.md5" "$MD5_URL" TARGET_MD5=$(cat "${BIN_FOLDER}/wp-cli.phar.md5") - wget -O "${BIN_FOLDER}/wp-cli.phar" "$PHAR_URL" + curl -sLo "${BIN_FOLDER}/wp-cli.phar" "$PHAR_URL" if hash md5sum 2>/dev/null; then DOWNLOAD_MD5=$(md5sum "${BIN_FOLDER}/wp-cli.phar" | cut -d ' ' -f 1) else From 7efa8836cb61dcabf6cf538c274c338d7b2bbe82 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Sat, 28 Mar 2026 12:33:54 +0100 Subject: [PATCH 04/20] Ensure exif extension is always installed --- .github/workflows/reusable-testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-testing.yml b/.github/workflows/reusable-testing.yml index a4d09b51..74f61aa9 100644 --- a/.github/workflows/reusable-testing.yml +++ b/.github/workflows/reusable-testing.yml @@ -63,7 +63,7 @@ jobs: uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2 with: php-version: '${{ inputs.php }}' - extensions: gd, imagick, mysql, zip, pdo_sqlite + extensions: gd, imagick, mysql, zip, pdo_sqlite, exif coverage: none tools: composer From 3267d3e00f0b9c5c44b9545ed1a170f77e53b3f6 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Sat, 28 Mar 2026 12:43:13 +0100 Subject: [PATCH 05/20] Install Ghostscript & sqlite3 on Windows --- .github/workflows/reusable-testing.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/reusable-testing.yml b/.github/workflows/reusable-testing.yml index 74f61aa9..c38501b0 100644 --- a/.github/workflows/reusable-testing.yml +++ b/.github/workflows/reusable-testing.yml @@ -58,6 +58,10 @@ jobs: sudo apt-get update sudo apt-get install ghostscript -y + - name: Install dependencies (Windows) + if: ${{ startsWith(inputs.os, 'windows') }} + run: choco install sqlite ghostscript --yes + - name: Set up PHP environment if: steps.check_files.outputs.files_exists == 'true' uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2 From 0a68d6e1072684444ec059792155e1aa2c70c30e Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Sat, 28 Mar 2026 16:21:12 +0100 Subject: [PATCH 06/20] phar: false for now --- .github/workflows/testing.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index bd3b1294..1730a9d0 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -84,29 +84,25 @@ jobs: - php: '7.2' wp: trunk - # Only run one macos combination: php: 8.5, wp: latest, dbtype: sqlite, object_cache: none, use-phar: true + # Only run one macos combination: php: 8.5, wp: trunk, dbtype: sqlite, object_cache: none, use-phar: false - os: macos-latest php: '7.2' - os: macos-latest - wp: trunk + wp: latest - os: macos-latest dbtype: mysql - os: macos-latest object_cache: sqlite - - os: macos-latest - use-phar: false - # Only run one windows combination: php: 8.5, wp: latest, dbtype: sqlite, object_cache: none, use-phar: true + # Only run one windows combination: php: 8.5, wp: trunk, dbtype: sqlite, object_cache: none, use-phar: false - os: windows-latest php: '7.2' - os: windows-latest - wp: trunk + wp: latest - os: windows-latest dbtype: mysql - os: windows-latest object_cache: sqlite - - os: windows-latest - use-phar: false uses: ./.github/workflows/reusable-testing.yml with: From b00a172865c6d2f7854a257e55ae15fd646b8747 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Sat, 28 Mar 2026 17:00:21 +0100 Subject: [PATCH 07/20] explicit include --- .github/workflows/testing.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 1730a9d0..e8159462 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -103,6 +103,23 @@ jobs: dbtype: mysql - os: windows-latest object_cache: sqlite + + include: + # Explicitly add back the single combinations for macos and windows to run without phar, overriding global exclusions. + - os: macos-latest + php: '8.5' + test-package: wp-cli-bundle + wp: trunk + dbtype: sqlite + object_cache: none + use-phar: false + - os: windows-latest + php: '8.5' + test-package: wp-cli-bundle + wp: trunk + dbtype: sqlite + object_cache: none + use-phar: false uses: ./.github/workflows/reusable-testing.yml with: From 7f2ca0f633d75417d68f9a13377e9690ba22c084 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Sat, 28 Mar 2026 17:08:31 +0100 Subject: [PATCH 08/20] another one --- .github/workflows/testing.yml | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index e8159462..ac7b7fcc 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -60,9 +60,6 @@ jobs: - dbtype: mysql object_cache: sqlite - # SQLite runs only on WP latest and PHP 8.5 - - dbtype: sqlite - wp: trunk - dbtype: sqlite php: '7.2' @@ -104,22 +101,6 @@ jobs: - os: windows-latest object_cache: sqlite - include: - # Explicitly add back the single combinations for macos and windows to run without phar, overriding global exclusions. - - os: macos-latest - php: '8.5' - test-package: wp-cli-bundle - wp: trunk - dbtype: sqlite - object_cache: none - use-phar: false - - os: windows-latest - php: '8.5' - test-package: wp-cli-bundle - wp: trunk - dbtype: sqlite - object_cache: none - use-phar: false uses: ./.github/workflows/reusable-testing.yml with: From a93575e7a94059e20b2b4b56c1ed053c1c59729b Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Sat, 28 Mar 2026 22:51:24 +0100 Subject: [PATCH 09/20] Install Ghostscript on macOS --- .github/workflows/reusable-testing.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/reusable-testing.yml b/.github/workflows/reusable-testing.yml index c38501b0..4a46a007 100644 --- a/.github/workflows/reusable-testing.yml +++ b/.github/workflows/reusable-testing.yml @@ -62,6 +62,10 @@ jobs: if: ${{ startsWith(inputs.os, 'windows') }} run: choco install sqlite ghostscript --yes + - name: Install dependencies (macOS) + if: ${{ startsWith(inputs.os, 'macos') }} + run: brew install ghostscript + - name: Set up PHP environment if: steps.check_files.outputs.files_exists == 'true' uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2 From 256a4fb651ee47e752a7884ecabdde71b0842bee Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Mon, 13 Apr 2026 18:30:27 +0200 Subject: [PATCH 10/20] Install fileinfo --- .github/workflows/reusable-testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-testing.yml b/.github/workflows/reusable-testing.yml index 4a46a007..cd2fcac5 100644 --- a/.github/workflows/reusable-testing.yml +++ b/.github/workflows/reusable-testing.yml @@ -71,7 +71,7 @@ jobs: uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2 with: php-version: '${{ inputs.php }}' - extensions: gd, imagick, mysql, zip, pdo_sqlite, exif + extensions: gd, imagick, mysql, zip, pdo_sqlite, exif, fileinfo coverage: none tools: composer From afb3b2fdf0c8a80ae0ec3e5bc16709e36e3c0248 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Tue, 5 May 2026 11:33:45 +0200 Subject: [PATCH 11/20] Update matrix --- .github/workflows/testing.yml | 19 ++++++++++++++++++- bin/test-source | 15 ++++++++++++--- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index ac7b7fcc..7bb29172 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -19,7 +19,7 @@ jobs: matrix: php: ['7.2', '8.5'] wp: ['latest', 'trunk'] - dbtype: ['mysql', 'sqlite'] + dbtype: ['mysql', 'sqlite', 'mariadb'] object_cache: ['none', 'sqlite'] use-phar: [false, true] os: ['ubuntu-22.04', 'macos-latest', 'windows-latest'] @@ -101,7 +101,24 @@ jobs: - os: windows-latest object_cache: sqlite + # Skip Windows tests for db-command to to environment configuration issues with SQLite. + - os: windows-latest + test-package: db-command + # Limit MariaDB runs to php: 8.5, wp: trunk, os: ubuntu-22.04, object_cache: none, use-phar: false + - dbtype: mariadb + php: '7.2' + - dbtype: mariadb + wp: latest + - dbtype: mariadb + os: macos-latest + - dbtype: mariadb + os: windows-latest + - dbtype: mariadb + object_cache: sqlite + - dbtype: mariadb + use-phar: true + uses: ./.github/workflows/reusable-testing.yml with: test-package: ${{ matrix.test-package }} diff --git a/bin/test-source b/bin/test-source index 204690c9..b12221df 100755 --- a/bin/test-source +++ b/bin/test-source @@ -20,6 +20,10 @@ if [ -z "$BUILD_DIR" ]; then export BUILD_DIR="${GITHUB_WORKSPACE:-$(pwd)}" fi +if [[ "$OS" == "Windows_NT" ]]; then + export BUILD_DIR=$(cygpath -w "$BUILD_DIR") +fi + if [ -z "$TEST_PACKAGE" -o "$TEST_PACKAGE" == "none" ]; then echo "Skipping feature tests completely." exit 0 @@ -43,13 +47,18 @@ for REPO in $REPOS; do echo "Testing package $REPO..." - BEHAT_TAGS=$(BEHAT_FEATURES_FOLDER=${BUILD_DIR}/vendor/${REPO}/features php ${BUILD_DIR}/vendor/wp-cli/wp-cli-tests/utils/behat-tags.php) + FEATURES_FOLDER="${BUILD_DIR}/vendor/${REPO}/features" + if [[ "$OS" == "Windows_NT" ]]; then + FEATURES_FOLDER=$(cygpath -w "$FEATURES_FOLDER") + fi + + BEHAT_TAGS=$(BEHAT_FEATURES_FOLDER="$FEATURES_FOLDER" php "${BUILD_DIR}/vendor/wp-cli/wp-cli-tests/utils/behat-tags.php") echo "Behat Tags: $BEHAT_TAGS" set +e - "${BUILD_DIR}/vendor/bin/behat" --format progress $BEHAT_TAGS --strict --suite $REPO + "${BUILD_DIR}/vendor/bin/behat" --format progress $BEHAT_TAGS --strict --suite $REPO if [ $? -ne 0 ]; then - "${BUILD_DIR}/vendor/bin/behat" --format progress $BEHAT_TAGS --strict --suite $REPO --rerun + "${BUILD_DIR}/vendor/bin/behat" --format progress $BEHAT_TAGS --strict --suite $REPO --rerun if [ $? -ne 0 ]; then FAILED_PACKAGES="$FAILED_PACKAGES ${RELEASE}:${REPO}" fi From 0b0f64fc3eff929dac0ec5d39f7eefbcedb098cf Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Wed, 6 May 2026 10:21:13 +0200 Subject: [PATCH 12/20] Reduce matrix --- .github/workflows/testing.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 7bb29172..676333d0 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -76,6 +76,8 @@ jobs: wp: trunk - use-phar: false wp: latest + - use-phar: true + php: '7.2' # Limit ancient php on trunk - php: '7.2' From a73ece9ff5580b37c173febe680aebba02d24b52 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Wed, 6 May 2026 10:21:52 +0200 Subject: [PATCH 13/20] Remove windows check --- bin/test-source | 7 ------- 1 file changed, 7 deletions(-) diff --git a/bin/test-source b/bin/test-source index b12221df..b00d310c 100755 --- a/bin/test-source +++ b/bin/test-source @@ -20,10 +20,6 @@ if [ -z "$BUILD_DIR" ]; then export BUILD_DIR="${GITHUB_WORKSPACE:-$(pwd)}" fi -if [[ "$OS" == "Windows_NT" ]]; then - export BUILD_DIR=$(cygpath -w "$BUILD_DIR") -fi - if [ -z "$TEST_PACKAGE" -o "$TEST_PACKAGE" == "none" ]; then echo "Skipping feature tests completely." exit 0 @@ -48,9 +44,6 @@ for REPO in $REPOS; do echo "Testing package $REPO..." FEATURES_FOLDER="${BUILD_DIR}/vendor/${REPO}/features" - if [[ "$OS" == "Windows_NT" ]]; then - FEATURES_FOLDER=$(cygpath -w "$FEATURES_FOLDER") - fi BEHAT_TAGS=$(BEHAT_FEATURES_FOLDER="$FEATURES_FOLDER" php "${BUILD_DIR}/vendor/wp-cli/wp-cli-tests/utils/behat-tags.php") echo "Behat Tags: $BEHAT_TAGS" From 17014a274b93948b8e2116acb4e3b019e9c9fef1 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Wed, 6 May 2026 10:27:49 +0200 Subject: [PATCH 14/20] Try fix MariaDB setup --- .github/workflows/reusable-testing.yml | 8 +++++++- .github/workflows/testing.yml | 27 ++++++++++++++------------ 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/.github/workflows/reusable-testing.yml b/.github/workflows/reusable-testing.yml index f69b4de0..88023f0c 100644 --- a/.github/workflows/reusable-testing.yml +++ b/.github/workflows/reusable-testing.yml @@ -25,6 +25,10 @@ on: type: string required: false default: 'ubuntu-22.04' + mysql: + type: string + required: false + default: '' jobs: run-test: @@ -91,13 +95,15 @@ jobs: if: ${{ inputs.dbtype != 'sqlite' }} uses: shogo82148/actions-setup-mysql@9c42ca180d5f1dd4dceb54c23c5eda0384f4d265 # v1 with: - mysql-version: '8.0' # Standard MySQL version for these tests + mysql-version: ${{ inputs.mysql || '8.0' }} auto-start: true root-password: ${{ env.WP_CLI_TEST_DBROOTPASS }} user: ${{ env.WP_CLI_TEST_DBUSER}} password: ${{ env.WP_CLI_TEST_DBPASS}} my-cnf: | default_authentication_plugin=mysql_native_password + ${{ inputs.dbtype == 'mariadb' && '[client]' || '' }} + ${{ inputs.dbtype == 'mariadb' && 'disable-ssl-verify-server-cert' || '' }} - name: Prepare test database if: steps.check_files.outputs.files_exists == 'true' && inputs.dbtype != 'sqlite' diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 676333d0..f02432f9 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -20,6 +20,7 @@ jobs: php: ['7.2', '8.5'] wp: ['latest', 'trunk'] dbtype: ['mysql', 'sqlite', 'mariadb'] + mysql: ['mysql-8.0'] object_cache: ['none', 'sqlite'] use-phar: [false, true] os: ['ubuntu-22.04', 'macos-latest', 'windows-latest'] @@ -107,19 +108,20 @@ jobs: - os: windows-latest test-package: db-command - # Limit MariaDB runs to php: 8.5, wp: trunk, os: ubuntu-22.04, object_cache: none, use-phar: false + # Globally exclude generated MariaDB + MySQL combinations - dbtype: mariadb - php: '7.2' - - dbtype: mariadb - wp: latest - - dbtype: mariadb - os: macos-latest - - dbtype: mariadb - os: windows-latest - - dbtype: mariadb - object_cache: sqlite - - dbtype: mariadb - use-phar: true + mysql: mysql-8.0 + + include: + # Include the single working MariaDB combination for all packages + - php: '8.5' + wp: trunk + dbtype: mariadb + mysql: mariadb-10.11 + object_cache: none + use-phar: false + os: ubuntu-22.04 + uses: ./.github/workflows/reusable-testing.yml with: @@ -130,4 +132,5 @@ jobs: object_cache: ${{ matrix.object_cache }} use-phar: ${{ matrix.use-phar }} os: ${{ matrix.os }} + mysql: ${{ matrix.mysql }} From 7d1a2194961e1d380fae203b9c9f6562fd6d1c03 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Wed, 6 May 2026 10:34:37 +0200 Subject: [PATCH 15/20] Try another combo --- .github/workflows/testing.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index f02432f9..9ef4b99c 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -20,7 +20,6 @@ jobs: php: ['7.2', '8.5'] wp: ['latest', 'trunk'] dbtype: ['mysql', 'sqlite', 'mariadb'] - mysql: ['mysql-8.0'] object_cache: ['none', 'sqlite'] use-phar: [false, true] os: ['ubuntu-22.04', 'macos-latest', 'windows-latest'] @@ -108,19 +107,20 @@ jobs: - os: windows-latest test-package: db-command - # Globally exclude generated MariaDB + MySQL combinations + # Limit MariaDB runs to php: 8.5, wp: trunk, os: ubuntu-22.04, object_cache: none, use-phar: false - dbtype: mariadb - mysql: mysql-8.0 + php: '7.2' + - dbtype: mariadb + wp: latest + - dbtype: mariadb + os: macos-latest + - dbtype: mariadb + os: windows-latest + - dbtype: mariadb + object_cache: sqlite + - dbtype: mariadb + use-phar: true - include: - # Include the single working MariaDB combination for all packages - - php: '8.5' - wp: trunk - dbtype: mariadb - mysql: mariadb-10.11 - object_cache: none - use-phar: false - os: ubuntu-22.04 uses: ./.github/workflows/reusable-testing.yml @@ -132,5 +132,5 @@ jobs: object_cache: ${{ matrix.object_cache }} use-phar: ${{ matrix.use-phar }} os: ${{ matrix.os }} - mysql: ${{ matrix.mysql }} + mysql: ${{ matrix.dbtype == 'mariadb' && 'mariadb-10.11' || 'mysql-8.0' }} From 77e4756b075b8bc76c310b6878d39c33faa4360b Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Wed, 6 May 2026 10:48:29 +0200 Subject: [PATCH 16/20] cleanup --- .github/workflows/reusable-testing.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/reusable-testing.yml b/.github/workflows/reusable-testing.yml index 88023f0c..55c5d1f4 100644 --- a/.github/workflows/reusable-testing.yml +++ b/.github/workflows/reusable-testing.yml @@ -105,6 +105,10 @@ jobs: ${{ inputs.dbtype == 'mariadb' && '[client]' || '' }} ${{ inputs.dbtype == 'mariadb' && 'disable-ssl-verify-server-cert' || '' }} + - name: Remove system MySQL binary + if: steps.check_files.outputs.files_exists == 'true' && inputs.dbtype != 'sqlite' + run: sudo rm -f /usr/bin/mysql /usr/bin/mysqldump + - name: Prepare test database if: steps.check_files.outputs.files_exists == 'true' && inputs.dbtype != 'sqlite' run: composer prepare-tests From 285f39f013833a093efc05a725728d7c47b0f942 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Wed, 6 May 2026 12:02:56 +0200 Subject: [PATCH 17/20] set SSL_CERT_FILE --- .github/workflows/reusable-testing.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/reusable-testing.yml b/.github/workflows/reusable-testing.yml index 55c5d1f4..b1dbc139 100644 --- a/.github/workflows/reusable-testing.yml +++ b/.github/workflows/reusable-testing.yml @@ -125,6 +125,7 @@ jobs: WP_CLI_TEST_DBTYPE: ${{ inputs.dbtype }} WP_CLI_TEST_DBSOCKET: '${{ steps.setup-mysql.outputs.base-dir }}/tmp/mysql.sock' WP_CLI_TEST_DEBUG_BEHAT_ENV: 1 + SSL_CERT_FILE: '${{ steps.setup-mysql.outputs.base-dir }}/var/ca.pem' run: composer behat - name: Run Behat @@ -134,4 +135,5 @@ jobs: WP_CLI_TEST_DBTYPE: ${{ inputs.dbtype }} TEST_PACKAGE: 'wp-cli/${{ inputs.test-package }}' WP_CLI_TEST_DBSOCKET: '${{ steps.setup-mysql.outputs.base-dir }}/tmp/mysql.sock' + SSL_CERT_FILE: '${{ steps.setup-mysql.outputs.base-dir }}/var/ca.pem' run: composer test From 3b7ade5b62e7591587d343d6fe18627e60507f88 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Wed, 6 May 2026 12:21:00 +0200 Subject: [PATCH 18/20] trust cert? --- .github/workflows/reusable-testing.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reusable-testing.yml b/.github/workflows/reusable-testing.yml index b1dbc139..cba739b4 100644 --- a/.github/workflows/reusable-testing.yml +++ b/.github/workflows/reusable-testing.yml @@ -105,6 +105,10 @@ jobs: ${{ inputs.dbtype == 'mariadb' && '[client]' || '' }} ${{ inputs.dbtype == 'mariadb' && 'disable-ssl-verify-server-cert' || '' }} + - name: Trust GHA CA cert on Linux GHA + if: steps.check_files.outputs.files_exists == 'true' && inputs.dbtype == 'mariadb' && (inputs.os == 'ubuntu-22.04' || inputs.os == '') + run: cat "${{ steps.setup-mysql.outputs.base-dir }}/var/ca.pem" | sudo tee -a /etc/ssl/certs/ca-certificates.crt + - name: Remove system MySQL binary if: steps.check_files.outputs.files_exists == 'true' && inputs.dbtype != 'sqlite' run: sudo rm -f /usr/bin/mysql /usr/bin/mysqldump @@ -125,7 +129,6 @@ jobs: WP_CLI_TEST_DBTYPE: ${{ inputs.dbtype }} WP_CLI_TEST_DBSOCKET: '${{ steps.setup-mysql.outputs.base-dir }}/tmp/mysql.sock' WP_CLI_TEST_DEBUG_BEHAT_ENV: 1 - SSL_CERT_FILE: '${{ steps.setup-mysql.outputs.base-dir }}/var/ca.pem' run: composer behat - name: Run Behat @@ -135,5 +138,4 @@ jobs: WP_CLI_TEST_DBTYPE: ${{ inputs.dbtype }} TEST_PACKAGE: 'wp-cli/${{ inputs.test-package }}' WP_CLI_TEST_DBSOCKET: '${{ steps.setup-mysql.outputs.base-dir }}/tmp/mysql.sock' - SSL_CERT_FILE: '${{ steps.setup-mysql.outputs.base-dir }}/var/ca.pem' run: composer test From efe1bbac058b198471c44c19a69d0ecf5d9cee6d Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Wed, 6 May 2026 12:32:01 +0200 Subject: [PATCH 19/20] `update-ca-certificates` --- .github/workflows/reusable-testing.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable-testing.yml b/.github/workflows/reusable-testing.yml index cba739b4..93009e52 100644 --- a/.github/workflows/reusable-testing.yml +++ b/.github/workflows/reusable-testing.yml @@ -107,7 +107,9 @@ jobs: - name: Trust GHA CA cert on Linux GHA if: steps.check_files.outputs.files_exists == 'true' && inputs.dbtype == 'mariadb' && (inputs.os == 'ubuntu-22.04' || inputs.os == '') - run: cat "${{ steps.setup-mysql.outputs.base-dir }}/var/ca.pem" | sudo tee -a /etc/ssl/certs/ca-certificates.crt + run: | + sudo cp "${{ steps.setup-mysql.outputs.base-dir }}/var/ca.pem" /usr/local/share/ca-certificates/gha-ca.crt + sudo update-ca-certificates - name: Remove system MySQL binary if: steps.check_files.outputs.files_exists == 'true' && inputs.dbtype != 'sqlite' From 5641915d87a726bd2015de3bd449bcfc03d16d13 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Wed, 6 May 2026 14:43:53 +0200 Subject: [PATCH 20/20] another one --- .github/workflows/reusable-testing.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/reusable-testing.yml b/.github/workflows/reusable-testing.yml index 93009e52..2dd8b0ec 100644 --- a/.github/workflows/reusable-testing.yml +++ b/.github/workflows/reusable-testing.yml @@ -105,12 +105,6 @@ jobs: ${{ inputs.dbtype == 'mariadb' && '[client]' || '' }} ${{ inputs.dbtype == 'mariadb' && 'disable-ssl-verify-server-cert' || '' }} - - name: Trust GHA CA cert on Linux GHA - if: steps.check_files.outputs.files_exists == 'true' && inputs.dbtype == 'mariadb' && (inputs.os == 'ubuntu-22.04' || inputs.os == '') - run: | - sudo cp "${{ steps.setup-mysql.outputs.base-dir }}/var/ca.pem" /usr/local/share/ca-certificates/gha-ca.crt - sudo update-ca-certificates - - name: Remove system MySQL binary if: steps.check_files.outputs.files_exists == 'true' && inputs.dbtype != 'sqlite' run: sudo rm -f /usr/bin/mysql /usr/bin/mysqldump @@ -131,6 +125,8 @@ jobs: WP_CLI_TEST_DBTYPE: ${{ inputs.dbtype }} WP_CLI_TEST_DBSOCKET: '${{ steps.setup-mysql.outputs.base-dir }}/tmp/mysql.sock' WP_CLI_TEST_DEBUG_BEHAT_ENV: 1 + SSL_CERT_FILE: '${{ steps.setup-mysql.outputs.base-dir }}/var/ca.pem' + CURL_CA_BUNDLE: /etc/ssl/certs/ca-certificates.crt run: composer behat - name: Run Behat @@ -140,4 +136,6 @@ jobs: WP_CLI_TEST_DBTYPE: ${{ inputs.dbtype }} TEST_PACKAGE: 'wp-cli/${{ inputs.test-package }}' WP_CLI_TEST_DBSOCKET: '${{ steps.setup-mysql.outputs.base-dir }}/tmp/mysql.sock' + SSL_CERT_FILE: '${{ steps.setup-mysql.outputs.base-dir }}/var/ca.pem' + CURL_CA_BUNDLE: /etc/ssl/certs/ca-certificates.crt run: composer test