Skip to content

Repair wp/5.8 branch Actions: Test against a single Node.js version - #84434

Open
desrosj wants to merge 5 commits into
fix-actions-5.8/remove-mobile-unit-js-jobfrom
fix-actions-5.8/single-node-version-testing
Open

desrosj wants to merge 5 commits into
fix-actions-5.8/remove-mobile-unit-js-jobfrom
fix-actions-5.8/single-node-version-testing

Conversation

@desrosj

@desrosj desrosj commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

Part of #82935.

What?

Eliminates every Node.js version-matrix dimension across wp/5.8's workflows, falling back to the version pinned in .nvmrc (14) instead.

Workflow Job Old matrix Change
unit-test.yml unit-js node: ['12', '14'] Matrix removed; node-version-file: '.nvmrc'
create-block.yml checks node: ['12', '14'] Matrix removed; node-version-file: '.nvmrc'
end2end-test.yml admin part: [1,2,3,4], node: ['14'] node dimension removed, part sharding dimension kept; node-version-file: '.nvmrc'
bundle-size.yml build node: ['14'] Matrix (its only dimension) removed entirely; node-version-file: '.nvmrc'

This branch has no actions/setup-node call anywhere with check-latest: true set, so there was nothing to remove for that part of this change. The remaining hardcoded node-version: 14 values (unit-test.yml's unit-php job and static-checks.yml) are switched to .nvmrc by #84436.

With the node matrix gone, the ~/.npm cache key no longer includes a Node.js version: every job now uses ${{ runner.os }}-node-npm-cache-<lockfile hash>. This includes unit-php and static-checks.yml, whose keys had node-14 written out. Without that, those two jobs would keep a separate cache entry with the same contents, and neither entry could fall back to the other since no job sets restore-keys.

Why?

wp/5.8 is a frozen, security-maintenance-only branch that will never move off the Node version pinned in .nvmrc. Testing against Node 12 in addition to 14 (in unit-test.yml and create-block.yml) or carrying a single-value node matrix dimension elsewhere never provided real coverage on this branch and only cost CI time. Reading the version from .nvmrc via node-version-file also means the workflow and .nvmrc can't drift out of sync, since there's only one place the version is declared.

Use of AI Tools

This PR was created by Claude Code under my supervision. All code should be treated as AI-produced and not yet reviewed by a human until this PR is marked Ready for Review.

@desrosj desrosj added the [Type] Build Tooling Issues or PRs related to build tooling label Oct 9, 2026
@desrosj desrosj self-assigned this Oct 9, 2026
@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 29525672-524f-44d5-99ce-69228c298613

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@desrosj
desrosj removed this pull request from stack #84460 October 10, 2026 00:22
@desrosj
desrosj changed the base branch from fix-actions-5.8/remove-mobile-unit-js-job to wp/5.8 October 10, 2026 00:22
@desrosj
desrosj force-pushed the fix-actions-5.8/single-node-version-testing branch from fbdbad1 to 6163b0d Compare October 10, 2026 00:24
@desrosj
desrosj changed the base branch from wp/5.8 to fix-actions-5.8/remove-mobile-unit-js-job October 10, 2026 00:26
@desrosj
desrosj added this pull request to stack #84492 October 10, 2026 00:27
@desrosj
desrosj marked this pull request as ready for review October 13, 2026 01:06
@github-actions

github-actions Bot commented Oct 13, 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: desrosj <desrosj@git.wordpress.org>
Co-authored-by: lucatume <lucatume@git.wordpress.org>

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

@desrosj
desrosj removed this pull request from stack #84492 October 16, 2026 01:21
@desrosj
desrosj added this pull request to stack #84874 October 16, 2026 01:21
@desrosj
desrosj removed this pull request from stack #84874 October 16, 2026 15:49
@desrosj
desrosj added this pull request to stack #84943 October 16, 2026 15:50
@desrosj desrosj changed the title Repair wp/5.8 branch Actions: single Node.js version testing Repair wp/5.8 branch Actions: Test against a single Node.js version Oct 16, 2026
@desrosj
desrosj removed this pull request from stack #84943 October 21, 2026 19:47
@desrosj
desrosj added this pull request to stack #85352 October 21, 2026 19:48

@lucatume lucatume 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.

This PR splits the npm cache. The jobs changed here now use ${{ runner.os }}-node-npm-cache-..., but the PHP job (unit-test.yml:76) and static-checks.yml:40 still use ${{ runner.os }}-node-14-npm-cache-.... No workflow sets restore-keys, so every lockfile hash gets two ~/.npm entries with the same content, each starting cold. Nothing later in the stack (#84436 included) aligns the keys.

Drop -14 from the remaining keys, here or in #84436:

--- a/.github/workflows/unit-test.yml
+++ b/.github/workflows/unit-test.yml
@@
-                  key: ${{ runner.os }}-node-14-npm-cache-${{ hashFiles('**/package-lock.json') }}
+                  key: ${{ runner.os }}-node-npm-cache-${{ hashFiles('**/package-lock.json') }}
--- a/.github/workflows/static-checks.yml
+++ b/.github/workflows/static-checks.yml
@@
-                  key: ${{ runner.os }}-node-14-npm-cache-${{ hashFiles('**/package-lock.json') }}
+                  key: ${{ runner.os }}-node-npm-cache-${{ hashFiles('**/package-lock.json') }}

@desrosj

desrosj commented Oct 22, 2026

Copy link
Copy Markdown
Member Author

Thanks, good catch. Fixed here in fd726ffaac, which drops -14 from the unit-php and static-checks.yml keys, so every job now uses ${{ runner.os }}-node-npm-cache-${{ hashFiles('**/package-lock.json') }}. The rest of the stack is rebased onto it with no other changes.

I checked the other wp/X.Y stacks too: none of them have this problem. 5.9 and newer use actions/setup-node's cache: npm, whose key doesn't include the Node.js version, and 5.7–5.5 use one cache-node-modules key in every job.

This branch has not been deployed

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

Labels

[Type] Build Tooling Issues or PRs related to build tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants