Skip to content

Build/Test Tools: Smoke check installed sites with a shared composite action. - #13388

Draft
adimoldovan wants to merge 2 commits into
WordPress:trunkfrom
adimoldovan:66036-add-smoke-check-after-install
Draft

Build/Test Tools: Smoke check installed sites with a shared composite action.#13388
adimoldovan wants to merge 2 commits into
WordPress:trunkfrom
adimoldovan:66036-add-smoke-check-after-install

Conversation

@adimoldovan

@adimoldovan adimoldovan commented Sep 3, 2026

Copy link
Copy Markdown

Moves the upgrade smoke check into a composite action at .github/actions/smoke-check/, with the script in smoke-check.sh, and runs the same check after installation in install-testing.yml.

Trac ticket: https://core.trac.wordpress.org/ticket/66036

Follow-up to #13355, which added this check inline in reusable-upgrade-testing.yml.

The jobs check the action out into ci-tools with a sparse checkout, then call it by relative path, so the checks on this pull request run the script as it stands here.

A second pull request will change the reference to WordPress/wordpress-develop/.github/actions/smoke-check@trunk and drop the checkout. The release branches need that: 6.9, 7.0 and 7.1 call reusable-upgrade-testing.yml@trunk, so trunk's reusable workflow runs with github.ref set to the release branch, where .github/actions does not exist. Keeping the two steps apart also keeps the tag out of this pull request, where it would fail to resolve until the action is on trunk.

The workflow linter now covers the script too. actionlint shellchecks inline run: blocks but does not read composite actions, so the linter runs shellcheck over the scripts under .github/actions, and it triggers on changes to that directory.

Testing instructions

The Installation Tests and Upgrade Tests checks on this pull request run the step. Each single site row prints seven ok lines; multisite rows skip it.

To run the script by hand against a local site:

docker run -d --name wp-smoke-db -p 33061:3306 -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=test_db mysql:8.4
mkdir wp && cd wp
wp core download --version=nightly
wp config create --dbname=test_db --dbuser=root --dbpass=root --dbhost=127.0.0.1:33061
wp core install --url=http://localhost/ --title="Install Test" --admin_user=admin \
  --admin_password=password --admin_email=me@example.org --skip-email
RUNNER_TEMP=/tmp WP_ADMIN_USER=admin WP_ADMIN_PASSWORD=password \
  bash /path/to/wordpress-develop/.github/actions/smoke-check/smoke-check.sh

All seven checks print ok and the script exits 0. Note that it rewrites home and siteurl and edits wp-config.php, so the site is only good for the check afterwards.

To see it fail, run it again with a wrong WP_ADMIN_PASSWORD. The login check reports no authentication cookie, the script exits 1, and the server log goes to the output.

Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5
Used for: Extracting the script into the composite action, the workflow changes, and iterative code review. I reviewed and tested the result.

…s site.

The action serves an installed single site with PHP's built-in web server. It
checks the front end, REST API, database upgrade page, 404 handling, login,
dashboard, and server log. The script lives in `smoke-check.sh`, which reads as
a bash file instead of a 100-line inline `run:` block.

actionlint shellchecks inline `run:` blocks, but it does not read composite
actions. The workflow linter now runs shellcheck over the scripts under
`.github/actions`, and it triggers on changes to that directory.
Comment thread .github/workflows/install-testing.yml Fixed
Comment thread .github/workflows/reusable-upgrade-testing.yml Fixed
@adimoldovan adimoldovan self-assigned this Sep 3, 2026
@adimoldovan
adimoldovan force-pushed the 66036-add-smoke-check-after-install branch from a7da9c8 to 57eefe6 Compare September 3, 2026 17:25
@adimoldovan adimoldovan changed the title Build/Test Tools: Smoke check installed sites with a shared composite action. Build/Test Tools: Add a composite action that smoke checks a WordPress site. Sep 3, 2026
Upgrade testing calls the action instead of carrying the script inline.
Installation testing runs the same check after it installs a site. Both skip
multisite, because a network keeps its domain in wp-config.php and the
database, not in an option the script can move to a temporary port.

The jobs check the action out into `ci-tools` with a sparse checkout, and call
it by relative path. Each run then uses the script from the branch under test.
A follow-up changes the reference to `@trunk`, which the release branches need,
and drops the checkout.

Installation testing also gets a longer timeout for the added step.
@adimoldovan adimoldovan changed the title Build/Test Tools: Add a composite action that smoke checks a WordPress site. Build/Test Tools: Smoke check installed sites with a shared composite action. Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants