Skip to content

Build/Test Tools: Run the smoke check on multisite installations - #16355

Closed
adimoldovan wants to merge 3 commits into
WordPress:trunkfrom
adimoldovan:add/multisite-smoke-check
Closed

adimoldovan wants to merge 3 commits into
WordPress:trunkfrom
adimoldovan:add/multisite-smoke-check

Conversation

@adimoldovan

@adimoldovan adimoldovan commented Nov 30, 2026 •

Copy link
Copy Markdown

Enable the smoke checks for multisite in Installation Tests and Upgrade Tests.

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

A network picks its site from the request's Host header. The script used to move the site to http://127.0.0.1:8889, so a network found no site. Now the site keeps its installed URL, http://localhost, and curl sends every request to the local server with --connect-to localhost:80:127.0.0.1:8889. Single sites no longer need the home and siteurl rewrite either. The site must be installed at http://localhost/, as both workflows do.

On a network, the script also loads /wp-admin/network/ after it logs in. It checks only the main site, because php -S does no URL rewrites for subsite paths.

The workflows now load the action with $/.github/actions/smoke-check instead of @trunk. A pull request that changes the script then runs its own copy. Release branches still get trunk's copy, because they call reusable-upgrade-testing.yml@trunk and $/ resolves to that workflow's commit. Their multisite upgrade jobs then run the check too. setup-wp-cli already uses the same reference. The upgrade workflows run again on pull requests that change the action.

Testing instructions

The Installation Tests and Upgrade Tests checks on this pull request run the step. Multisite rows print ok /wp-admin/network/. Single site rows print skip /wp-admin/network/ (not a network).

To run the script by hand:

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 multisite-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

Every check prints ok and the script exits 0. To check a single site, use wp core install instead. The network check then prints skip.

Testing done

  • CI on this pull request: the smoke step passed on every job, including 232 multisite jobs, in Installation Tests, Upgrade Tests and Upgrade Develop Version Tests. Multisite jobs print ok /wp-admin/network/.
  • Locally, in Docker: WordPress 4.7, WP-CLI 2.4.0 and MySQL 5.7, on PHP 5.6 and PHP 7.1, as a network and as a single site. Every check passed. Pull request runs of Installation Tests install only nightly, so this covers an old release.

Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5
Used for: The script and workflow changes, local testing, and iterative code review.


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

Requests keep the installed host name, `localhost`, so a network finds its main site. A new check loads the network admin. The workflows load the action from their own commit, so a pull request runs its own copy.
@adimoldovan adimoldovan self-assigned this Dec 1, 2026
@adimoldovan
adimoldovan marked this pull request as ready for review December 1, 2026 11:23
@github-actions

github-actions Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs.

Core Committers: Use this line as a base for the props when committing in SVN:

Props adrianmoldovanwp, mukesh27, lancewillett.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub or WordPress.org user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

@adimoldovan
adimoldovan requested a review from a team December 1, 2026 11:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are identified for the multisite smoke-check changes.

No open issues 🎉

What changed in this PR

Extends installation and upgrade smoke checks to WordPress multisite networks while preserving the installed localhost URL.

Changes:

  • Routes HTTP requests to the local PHP server without rewriting site URLs and adds a network-admin check.
  • Enables smoke checks for multisite jobs and uses workflow-relative action references.
  • Triggers upgrade workflows when the smoke-check action changes and updates its description.
File Description
.github/​workflows/​upgrade-testing.yml Triggers upgrade tests for smoke-check action changes.
.github/​workflows/​upgrade-develop-testing.yml Triggers develop upgrade tests for smoke-check action changes.
.github/​workflows/​reusable-upgrade-testing.yml Enables multisite smoke checks using a workflow-relative action reference.
.github/​workflows/​install-testing.yml Enables multisite smoke checks using a workflow-relative action reference.
.github/​actions/​smoke-check/​smoke-check.sh Preserves installed URLs, routes curl requests locally, and checks network admin.
.github/​actions/​smoke-check/​action.yml Updates the description to include network support.

Review effort: Balanced

@lancewillett lancewillett left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested the script on fresh single-site and multisite installations. Both kept their installed URL, and the logged-in network-admin check ran only on multisite. The 4.7 multisite upgrade job also loaded the action from the workflow revision and passed that check. The 7.3 workflow ticket is https://core.trac.wordpress.org/ticket/66754.

AI review · gpt-6.2-astra

…localhost.

Without this, a site at another URL fails later at the REST check, and the error does not name the cause.

@lancewillett lancewillett left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new URL check accepts localhost with or without a trailing slash. I verified that a different URL exits with the diagnostic before changing any WordPress options. The multisite upgrade smoke check also passed on this commit. Thanks for picking up Mukesh’s suggestion.

AI review · gpt-6.2-astra

@lancewillett lancewillett moved this from In review to Ready in WordPress Project Build Tooling Dec 1, 2026
wporg-sync pushed a commit that referenced this pull request Dec 1, 2026
…ite.

Keep the installed site URL and route HTTP requests to the local server. On multisite, also check that a logged-in user can load the network admin. Run the smoke check from the workflow revision so changes to the action are tested before landing.

Follow-up to [63517], [63518].

Developed in: #16355

Props adrianmoldovanwp, mukesh27.
See #66754, #66036.


git-svn-id: https://develop.svn.wordpress.org/trunk@65854 602fd350-edb4-49c9-b593-d223f7449a82
wporg-sync pushed a commit to WordPress/WordPress that referenced this pull request Dec 1, 2026
…ite.

Keep the installed site URL and route HTTP requests to the local server. On multisite, also check that a logged-in user can load the network admin. Run the smoke check from the workflow revision so changes to the action are tested before landing.

Follow-up to [63517], [63518].

Developed in: WordPress/wordpress-develop#16355

Props adrianmoldovanwp, mukesh27.
See #66754, #66036.

Built from https://develop.svn.wordpress.org/trunk@65854


git-svn-id: http://core.svn.wordpress.org/trunk@64883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
@lancewillett

Copy link
Copy Markdown
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

4 participants