Repository navigation
Run the development build during prepare - #351
Conversation
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.
|
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
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 |
|
Tested on an xCloud server, as a host test of the Environment
Results (
So the change fixes #350 on this stack too, with the same counts as in the PR description. Full suite (25,936 tests, same server, same r64225, about 460 s each)
One follow-up: when this lands, I will update #347, which still names |
|
Thanks for the thorough run, Arif. Same numbers as my local runs, and xCloud is a different stack from mine, so that is the host confirmation Amy asked for. The tzdata-legacy note is useful on its own: the 7 timezone failures are a server package gap, not the runner, and Sounds good on #347, the build:dev wording there can follow once this lands. |
chrisdavidmiles
left a comment
There was a problem hiding this comment.
I confirmed this on a Bluehost server. I ran the same wordpress-develop checkout (c64de70) both ways: on master, src/wp-includes/js/jquery/ is absent and the four test_jquery_files_exist cases fail; on this branch, the four files build into src/ and pass, with test_build_wp_version_does_not_end_with_src skipped as expected. These results match the xCloud run.
# Conflicts: # prepare.php
Fixes #350.
Problem
Since core r63983, host reports fail four tests:
Tests_Dependencies_jQuery::test_jquery_files_existforjquery.js,jquery.min.js,jquery-migrate.jsandjquery-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.phprunsnpm run build, which writes the built files tobuild/. The test suite runs againstsrc/, which isABSPATHin the generatedwp-tests-config.php. The new test asserts that the jQuery files exist undersrc/wp-includes/js/jquery/, and only the development build creates that directory.Fix
Run
npm run build:devinstead. It writes the built files intosrc/, and it is the build that core's own PHPUnit workflow runs:npm ci, thennpm run build:dev.What changes for hosts
Tests_Basic::test_build_wp_version_does_not_end_with_srcis now skipped, becausebuild/is no longer produced. Core's own workflow skips it for the same reason.build/directory, which was 152 MB in my run.Verification
Real end to end runs of
prepare.phpandtest.phpagainst 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.src/, andTests_Dependencies_jQuerypasses with 7 tests and 48 assertions.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.masterends 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,phpcsandgit diff --checkare clean.Notes
npm run build. It would need the same one-word update.continue-on-error. That is outside this PR.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.