Skip to content

Run the development build during prepare - #351

Open
ekamran wants to merge 1 commit into
WordPress:masterfrom
ekamran:shifteq/350-build-dev
Open

ekamran wants to merge 1 commit into
WordPress:masterfrom
ekamran:shifteq/350-build-dev

Conversation

@ekamran

@ekamran ekamran commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Fixes #350.

Problem

Since core r63983, host reports fail four tests: Tests_Dependencies_jQuery::test_jquery_files_exist for jquery.js, jquery.min.js, jquery-migrate.js and jquery-migrate.min.js.

On the results site, r63982 has 22 passed and 2 failed reports. r63983 has 3 passed and 27 failed, and r64091 is still at 3 and 24. Only core's own reporter passes.

prepare.php runs npm run build, which writes the built files to build/. The test suite runs against src/, which is ABSPATH in the generated wp-tests-config.php. The new test asserts that the jQuery files exist under src/wp-includes/js/jquery/, and only the development build creates that directory.

Fix

Run npm run build:dev instead. It writes the built files into src/, and it is the build that core's own PHPUnit workflow runs: npm ci, then npm run build:dev.

What changes for hosts

  • The four jQuery tests pass.
  • Tests_Basic::test_build_wp_version_does_not_end_with_src is now skipped, because build/ is no longer produced. Core's own workflow skips it for the same reason.
  • Prepare gets a little lighter. There is no build/ directory, which was 152 MB in my run.

Verification

Real end to end runs of prepare.php and test.php against trunk r64092, PHP 8.5, MySQL 9.7.

  • master: src/wp-includes/js/jquery/ does not exist after prepare, and the four tests fail with the same messages as in host-tests failing since r63983 (missing/invalid jQuery paths?) #350.
  • This branch: the four files exist in src/, and Tests_Dependencies_jQuery passes with 7 tests and 48 assertions.
  • Same comparison across the groups most likely to care about built files (dependencies, scripts, blocks, restapi, and the five test files that reference built paths, about 4,800 tests): the only differences are the four fixed tests and the one skipped test above.
  • Full suite, 25,703 tests: master ends with 4 failures, the same four tests, and 73 skipped. This branch ends with no failures and 74 skipped. The extra skip is the build version test above.
  • php -l, phpcs and git diff --check are clean.

Notes

Use of AI

AI assistance: Yes
Tool(s): Claude Code and Codex
Used for: Investigation, implementation, verification harness, and PR wording. I reviewed the reasoning and test results, and I take responsibility for the contribution.

prepare.php ran `npm run build`, which writes the built files to build/,
while the test suite runs against src/. Since core r63983 a test asserts
that the jQuery files exist under src/wp-includes/js/jquery/, so every
host using the runner fails four tests.

Run `npm run build:dev` instead. It writes the built files into src/ and
is the same build that WordPress core's own PHPUnit workflow runs.

Fixes WordPress#350.
@github-actions

github-actions Bot commented Oct 5, 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. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: ekamran <ekamran@git.wordpress.org>
Co-authored-by: kittenkamala <amykamala@git.wordpress.org>
Co-authored-by: kmott <mywp459@git.wordpress.org>

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

@kittenkamala

Copy link
Copy Markdown
Collaborator

Thank you so much for catching this. Would be great to have some hosts test on their systems to confirm the change to using build:dev is effective.

Maybe @jazzsequence and @chrisdavidmiles could test on Pantheon and BlueHost systems

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.

host-tests failing since r63983 (missing/invalid jQuery paths?)

2 participants