Skip to content

Repair wp/5.5 branch Actions: Always read the Node.js version from .nvmrc - #84997

Open
desrosj wants to merge 5 commits into
fix-actions-5.5/pin-runner-imagesfrom
fix-actions-5.5/read-node-version-from-nvmrc
Open

desrosj wants to merge 5 commits into
fix-actions-5.5/pin-runner-imagesfrom
fix-actions-5.5/read-node-version-from-nvmrc

Conversation

@desrosj

@desrosj desrosj commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Part of #82938.

What?

Replaces the hardcoded node-version: 12.x literal in every actions/setup-node step across wp/5.5's workflows with node-version-file: '.nvmrc', so .nvmrc becomes the one source of truth for the Node.js version this branch tests against:

Workflow Jobs updated
create-block.yml build
end2end-test.yml admin-1, admin-2, admin-3, admin-4
static-checks.yml check
unit-test.yml unit-js, unit-php

The mobile-unit-js job's setup step isn't included: that job is removed earlier in this stack (#84995).

Because the step's name also carried the version (Use Node.js 12.x), it is renamed to Setup Node.js — leaving a version in the step name would reintroduce exactly the duplication this change removes.

This PR does not change which Node.js version is used. .nvmrc still reads 12, so every job resolves to the same version as before; only the mechanism changes. Upgrading the pinned version is a separate concern, handled in the PR above this one.

Why?

A version repeated as a literal string in eight places can drift — a future edit to one copy (or to .nvmrc) has no mechanism keeping the others in step. Sourcing the version from .nvmrc via node-version-file removes that duplication and matches the single-source-of-truth approach this project uses for Node version handling on every other branch it has repaired.

wp/5.5 has no node version-testing matrix and no check-latest: true anywhere in its .github/ tree — every actions/setup-node call already tested exactly one hardcoded Node.js version, so there was no matrix dimension to eliminate and no stale re-check flag to remove, unlike on this project's newer wp/6.x branches. That is why this is framed as a single-source-of-truth fix rather than as the single-node-version-testing change its sibling branches received.

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 16, 2026
@desrosj desrosj self-assigned this Oct 16, 2026
@coderabbitai

coderabbitai Bot commented Oct 16, 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
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 65303e8a-0e88-415c-8d9c-dddaaf79df12

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.

@github-actions

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>

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

@desrosj desrosj changed the title Repair wp/5.5 branch Actions: Always read Node.js version from .nvmrc file Repair wp/5.5 branch Actions: Always read the Node.js version from .nvmrc Oct 19, 2026

@ramonjd ramonjd 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 failing checks fail the same way on the base PR, and pass at the top of this stack (#85016).

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