Stabilize Plugin Check by waiting for wp-env CLI readiness#41
Closed
Copilot wants to merge 2 commits into
Closed
Conversation
Copilot
AI
changed the title
[WIP] Fix Plugin Check workflow to ensure cli container readiness
Stabilize Plugin Check by waiting for Jun 4, 2026
wp-env CLI readiness
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 Checkwas still failing intermittently because the workflow invokedWordPress/plugin-check-action@v1before the@wordpress/envcliservice was actually up (service "cli" is not running). This update keeps the workflow shape intact and adds an explicit readiness gate between environment startup and plugin-check execution.Workflow readiness gating
Start WordPress environmentstep that starts@wordpress/envand immediately verifies container usability with a CLI command:Deterministic cleanup
Stop WordPress environmentstep withif: always()so cleanup runs even when plugin-check fails.Original prompt
Update the existing pull request for repository
HandyPlugins/security-txt-managerto fix the still-failingPlugin Checkworkflow.Latest failing job URL provided by the user:
Observed failure from logs:
ℹ Starting 'wp cli info' on the cli container.service "cli" is not running✖ Command failed with exit code 1.github/workflows/plugin-check.ymlnpx @wordpress/env startnpx @wordpress/env stopLikely issue:
clicontainer / WordPress stack to become ready beforeWordPress/plugin-check-action@v1runs.Please update the existing PR branch with a minimal safe fix focused on the workflow file only.
Implementation guidance:
.github/workflows/plugin-check.yml.@wordpress/env, add an explicit readiness check that waits for the CLI container / WordPress environment to be usable before running plugin check.npx @wordpress/env run cli wp core is-installed --allow-rootafternpx @wordpress/env start.Acceptance criteria:
@wordpress/env.WordPress/plugin-check-action@v1.The following is the prior conversation context from the user's chat exploration (may be truncated):
User: Please find a solution for this failing job. Use the logs, job definition, and any referenced files where the failure occurred. Keep your response focused on the solution and include code suggestions when appropriate.
Assistant: The failure is caused by the job invoking a WordPress environment check without first starting the environment:
Environment not initialized. Run \wp-env start` first.`.github/workflows/plugin-check.ymlFix
Initialize
wp-envbefore theRun Plugin Checkstep.Suggested workflow change
Update
.github/workflows/plugin-check.ymlto add a setup step before line 40:Why this fixes it
The action at
.github/workflows/plugin-check.yml#L40-L45runs in an environment that expectswp-envto already be running. Right now, the workflow installs dependencies and builds assets, but never starts WordPress.Optional hardening
To avoid leftover containers and make failures easier to debug, you can wrap cleanup with
if: always():