Avoid wp-env silent startup failures when loading Plugin Check#590
Merged
Conversation
Copilot
AI
changed the title
[WIP] Fix environment not initialized error in action
Avoid wp-env silent startup failures when loading Plugin Check
Jun 15, 2026
🔍 WordPress Plugin Check Report
📊 Report
❌ Errors (8)📁 hello.php (7 errors)
📁 readme.txt (1 error)
|
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
72 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound | Functions declared in the global namespace by a theme/plugin should start with the theme/plugin prefix. Found: "dolly_css". |
🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check
swissspidy
marked this pull request as ready for review
June 15, 2026 14:45
There was a problem hiding this comment.
Pull request overview
This PR updates the composite action to avoid wp-env “silent success” startup failures caused by preloading Plugin Check via a remote ZIP URL, and instead installs/activates Plugin Check after the environment is confirmed running.
Changes:
- Removes
https://downloads.wordpress.org/plugin/plugin-check.zipfrom the generated.wp-env.json. - Extends the retry-wrapped
wp-envstartup to immediately verify the environment withwp-env run cli wp cli info. - Installs (or reuses and activates) the
plugin-checkplugin via WP-CLI afterwp-envis up, and adds regression tests validating these behaviors.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
action.yml |
Stops preloading Plugin Check from a URL, adds a post-start verification command, and installs/activates Plugin Check via WP-CLI after boot. |
src/action.test.ts |
Adds regression tests ensuring action.yml no longer references plugin-check.zip and includes the new startup verification command. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
plugin-check-actionwas generating a.wp-env.jsonthat always loadedplugin-checkfrom a download URL. On newer GitHub runner images, that URL-plugin path can causewp-envto exit successfully without actually initializing the environment, leading toEnvironment not initialized. Run \wp-env start` first.` in later steps.Remove the fragile URL-plugin bootstrap path
https://downloads.wordpress.org/plugin/plugin-check.zipto the generated.wp-env.json.Install Plugin Check after wp-env is up
plugin-checkvia WP-CLI afterwp-env start.Fail early if wp-env did not actually start
wp-env run cli wp cli infoimmediately afterwp-env start --update.Add focused regression coverage
plugin-check.zip.