Build/Test Tools: Install the npm version required by package.json in GitHub Actions - #13505
manzoorwanijk wants to merge 6 commits into
Conversation
|
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 Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
ciampo
left a comment
There was a problem hiding this comment.
LGTM 🚀
Makes sense, as per instructions.
Not sure if we should wait for more approvals, especially for folks who continute to this repo more frequently.
Install the npm version required by `devEngines.packageManager`, keeping the bundled npm when the field is absent. Restore the npm download cache with `actions/cache`, since `actions/setup-node` resolves it with the bundled npm. Mirrors the Gutenberg action from WordPress/gutenberg#82775 and WordPress/gutenberg#82823. See #66099.
…ction. Disable npm caching in `actions/setup-node` and run `setup-npm` before installing dependencies. Skip the action on release branches that run these workflows from `trunk` without it. Run the calling workflows when the action changes. See #66099.
Declare the same Node.js and npm requirements as Gutenberg, so CI installs the required npm version. See #66099.
This reverts commit c0d3c9f.
df0e255 to
d699a1c
Compare
Adds a
setup-npmaction, mirroring WordPress/gutenberg#82775 and WordPress/gutenberg#82823, so CI installs the npm required bydevEngines.packageManagereven when Node.js bundles an older one. It also adds the samedevEnginesfield as Gutenberg topackage.json.It will allow us to use the latest version of npm in CI without the
EBADDEVENGINESerror.setup-npmowns the npm cache, becauseactions/setup-noderesolves it with the bundled npm, which fails withEBADDEVENGINESonce a newer npm is required.trunkagainst their own checkout, which lacks the action. AhashFilesgate skips it there.pathsfilters now include.github/actions/setup-npm/**.cc @desrosj: unrelated, but 6.9's
test-build-processes.ymlomitsgutenberg-branch, so it builds Gutenbergtrunkon Node.js 20 and every Gutenberg job fails withEBADENGINE. Passinggutenberg-branch: 'wp/6.9', as 6.5 to 6.8 do, we should fix it.Trac ticket: https://core.trac.wordpress.org/ticket/66099
Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5
Used for: Implementation and this description, reviewed by me.
🤖 Generated with Claude Code
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.