From 6ab1af70008b8a28b4a85cd0002640cf3f72bff3 Mon Sep 17 00:00:00 2001 From: Aditya Singh Date: Fri, 6 Nov 2026 07:40:30 +0530 Subject: [PATCH 1/2] feat(test-php): accept latest and trunk as wp-version --- .github/workflows/ci-test-php.yml | 12 +++++++++--- .github/workflows/wp-ci.yml | 6 +++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-test-php.yml b/.github/workflows/ci-test-php.yml index 2de0e73..b210baf 100644 --- a/.github/workflows/ci-test-php.yml +++ b/.github/workflows/ci-test-php.yml @@ -17,8 +17,9 @@ on: default: "" wp-version: description: >- - WordPress core version for wp-env, e.g. '6.8' (resolved as WordPress/WordPress#). - Empty uses the version from the consumer's .wp-env.json. Ignored when use-wp-env is false. + WordPress core for wp-env: 'latest' (newest stable release), 'trunk' (development + version), or a WordPress/WordPress tag such as '6.8.3' (x.y.0 releases are tagged 'x.y'). + Empty uses the consumer's .wp-env.json. Ignored when use-wp-env is false. type: string default: "" use-wp-env: @@ -48,9 +49,14 @@ jobs: # Pin the wp-env container's PHP/WordPress core via env: (not $GITHUB_ENV, which is # newline-injectable) at job scope, so start/run/stop resolve the same environment. # An empty WP_ENV_CORE is ignored by wp-env (falls back to the consumer's .wp-env.json). + # So 'latest' needs a real source (latest.zip), not an empty value. env: WP_ENV_PHP_VERSION: ${{ inputs.use-wp-env && inputs.php-version || '' }} - WP_ENV_CORE: ${{ (inputs.use-wp-env && inputs.wp-version != '') && format('WordPress/WordPress#{0}', inputs.wp-version) || '' }} + WP_ENV_CORE: >- + ${{ (inputs.use-wp-env && inputs.wp-version != '') && ( + inputs.wp-version == 'latest' && 'https://wordpress.org/latest.zip' + || inputs.wp-version == 'trunk' && 'WordPress/WordPress#master' + || format('WordPress/WordPress#{0}', inputs.wp-version)) || '' }} defaults: run: working-directory: ${{ inputs.working-dir }} diff --git a/.github/workflows/wp-ci.yml b/.github/workflows/wp-ci.yml index 7031d91..d2f7ec6 100644 --- a/.github/workflows/wp-ci.yml +++ b/.github/workflows/wp-ci.yml @@ -39,7 +39,11 @@ on: type: string default: '["8.3"]' wp-versions: - description: "JSON array of WordPress core versions for wp-env, crossed with php-versions, e.g. '[\"6.8\",\"6.9\"]'. An empty-string entry uses .wp-env.json. Ignored when use-wp-env is false." + description: >- + JSON array of WordPress core versions for wp-env, crossed with php-versions, e.g. + '["6.8","latest","trunk"]'. 'latest' is the newest stable release and 'trunk' the + development version. An empty-string entry uses .wp-env.json. Ignored when use-wp-env + is false. type: string default: '[""]' test-php-exclude: From 1046276e445342cc2e498b74ad271720f16148e0 Mon Sep 17 00:00:00 2001 From: Aditya Singh Date: Fri, 6 Nov 2026 08:10:32 +0530 Subject: [PATCH 2/2] feat(test-build-artifact): accept trunk as wp-version --- .github/workflows/ci-test-build-artifact.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-test-build-artifact.yml b/.github/workflows/ci-test-build-artifact.yml index 0bfea25..99c3fd9 100644 --- a/.github/workflows/ci-test-build-artifact.yml +++ b/.github/workflows/ci-test-build-artifact.yml @@ -24,7 +24,10 @@ on: type: string default: "" wp-version: - description: "WordPress version wp-env boots with. 'latest' uses the newest stable release." + description: >- + WordPress core wp-env boots: 'latest' (newest stable release), 'trunk' (development + version, which also skips wp doctor's core-verify-checksums), or a WordPress/WordPress tag + such as '6.8.3' (x.y.0 releases are tagged 'x.y'). type: string default: "latest" install-path: @@ -113,7 +116,9 @@ jobs: --arg php "$PHP_VERSION" \ --arg dest "${INSTALL_PATH%/}/${SLUG}" \ '{ - core: (if $wp == "latest" then null else "WordPress/WordPress#\($wp)" end), + core: (if $wp == "latest" then null + elif $wp == "trunk" then "WordPress/WordPress#master" + else "WordPress/WordPress#\($wp)" end), phpVersion: $php, plugins: [], themes: [], @@ -148,7 +153,9 @@ jobs: - name: Run wp doctor shell: bash env: - DOCTOR_IGNORE_CHECKS: ${{ inputs.doctor-ignore-checks }} + DOCTOR_IGNORE_CHECKS: >- + ${{ inputs.wp-version == 'trunk' && format('{0},core-verify-checksums', inputs.doctor-ignore-checks) + || inputs.doctor-ignore-checks }} run: | set -euo pipefail