Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions .github/workflows/ci-test-build-artifact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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: [],
Expand Down Expand Up @@ -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

Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/ci-test-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ on:
default: ""
wp-version:
description: >-
WordPress core version for wp-env, e.g. '6.8' (resolved as WordPress/WordPress#<version>).
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:
Expand Down Expand Up @@ -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 }}
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/wp-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading