Skip to content

Repair wp/7.1 branch Actions: Use the matching wordpress-develop branch for pre-release PHPUnit tests - #84760

Open
desrosj wants to merge 4 commits into
fix-actions-7.1/set-artifact-retention-daysfrom
fix-actions-7.1/use-matching-phpunit-test-branch
Open

desrosj wants to merge 4 commits into
fix-actions-7.1/set-artifact-retention-daysfrom
fix-actions-7.1/use-matching-phpunit-test-branch

Conversation

@desrosj

@desrosj desrosj commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Part of #82781.

What?

Backports #84758 (2266724) to this branch's wp-env: the PHPUnit test library for a WordPress alpha, beta or RC version now comes from that version's X.Y branch of WordPress/wordpress-develop when the branch exists, and only falls back to trunk when it doesn't. Released versions still use their tag.

Why?

This branch's wp-env config uses "core": "WordPress/WordPress#7.1-branch", which reports 7.1.4-alpha-64164 since the post-7.1.3 version bump. Because of the -alpha, wp-env downloads trunk's test library instead of 7.1's.

On 2026-10-13, WordPress/wordpress-develop@5744bc5 added the Secrets API to trunk, and trunk's tests/phpunit/includes/bootstrap.php now loads a Mock_Store implements WP_Secrets_Store test helper. 7.1-branch has no WP_Secrets_Store, so every PHP unit test job on this branch stops before running a test (https://github.com/WordPress/gutenberg/actions/runs/38666544526):

Error in bootstrap script: Error:
Interface 'WP_Secrets_Store' not found

With this change, 7.1.4-alpha-64164 gets the 7.1 branch of WordPress/wordpress-develop, whose test library matches 7.1-branch.

How?

Same change as #84758 in packages/env/lib/runtime/docker/download-wp-phpunit.js, adapted to this branch:

  • getTestSuiteRefs() turns the version from wp-includes/version.php into the refs to try, in order: the X.Y branch and then trunk for a pre-release, the tag and then the X.Y branch for a release, in case the tag does not exist yet.
  • fetchTestSuite() lists the refs that exist with a single git ls-remote call, fetches the first one, and checks out FETCH_HEAD, so a cached test library also moves to what was just fetched. It does not read git's error messages, which are translated in other locales.
  • The tests are written for Jest, which this branch uses for wp-env, instead of Vitest. The simple-git v3 default import this branch uses stays as it is.
  • Adds the changelog entry from Env: Use the matching wordpress-develop branch for pre-release PHPUnit tests #84758.

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.

🤖 Generated with Claude Code

@desrosj desrosj added the [Type] Build Tooling Issues or PRs related to build tooling label Oct 15, 2026
@desrosj desrosj self-assigned this Oct 15, 2026
@github-actions github-actions Bot added the [Tool] Env /packages/env label Oct 15, 2026
@desrosj
desrosj added this pull request to stack #84466 October 15, 2026 03:33
@coderabbitai

coderabbitai Bot commented Oct 15, 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: 50281684-503f-48dc-856f-14a768537405

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

github-actions Bot commented Oct 15, 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: ramonjd <ramonopoly@git.wordpress.org>

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

@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

🤖 PR meta 🤖

📦 Bundle size

Size Change: 0 B

Total Size: 7.75 MB

72e1480 Run

@desrosj
desrosj force-pushed the fix-actions-7.1/use-matching-phpunit-test-branch branch from 69d22ea to 72e1480 Compare October 19, 2026 17:02

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

Base PR #84743 This PR #84760
Unit Tests → PHP jobs fail all 7 pass
PHP 8.0 on Linux Error in bootstrap script: Error: Interface "WP_Secrets_Store" not found Tests: 2279, Assertions: 4760, Skipped: 7, Risky: 1
New Jest tests not present PASS packages/env/lib/test/download-wp-phpunit.js

Manually inspected "Unit Tests > PHP 8.0 on Linux" CI jobs

@desrosj
desrosj removed this pull request from stack #84466 October 21, 2026 18:35
@desrosj
desrosj added this pull request to stack #85326 October 21, 2026 18:36

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

[Tool] Env /packages/env [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