ci: pin @wordpress/env@11.7.0 to fix Plugin Check#181
Closed
abdul-kaioum wants to merge 6 commits into
Closed
Conversation
wordpress/plugin-check-action@v1 force-installs the latest @wordpress/env
at runtime (`npm -g i @wordpress/env`, no pin). @wordpress/env@11.8.0
(2026-06-04) silently exits 0 from `wp-env start` without bringing up the
Docker cli container, so `wp plugin check` runs against a non-existent
environment ("service cli is not running" / "Environment not initialized"),
writes no results file, and the job fails. Broken on all branches since
2026-06-08.
The action exposes no input to pin the wp-env version, so replace it with
explicit steps that mirror the action while pinning @wordpress/env@11.7.0
(last release before the regression):
- build the same .wp-env.json (plugin-check.zip + build-dir mapping)
- run the identical `wp plugin check` invocation (same categories/checks)
- gate the job on ERROR rows (WP-CLI exits 0 even on findings)
- upload the results artifact
Also optimize:
- testsEnvironment:false — skip tests-* containers (~half the Docker work)
- drop `wp-env start --update` — no forced re-fetch on a fresh runner
- run on pull_request only — avoid duplicate push+PR runs on merge
Revert to wordpress/plugin-check-action@v1 once upstream ships a fixed
@wordpress/env.
Assisted-By: AI
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
Plugin Check flagged two WordPress.WP.AlternativeFunctions errors in the image-sideload helper: - parse_url() -> wp_parse_url() (consistent output across PHP versions) - @Unlink() -> wp_delete_file() (WordPress file-deletion wrapper) Assisted-By: AI
Print the findings inside a collapsible log group and write them to the GitHub Actions job summary (✅ when clean), so results are visible without digging through the raw log. Strip the cli container's bootstrap notices and the stray wpdb error banner so the captured JSON stays clean. Assisted-By: AI
Move the pinned-wp-env Plugin Check logic out of the workflow and into .github/actions/plugin-check, mirroring wordpress/plugin-check-action@v1's input interface (build-dir, categories, checks, exclude-directories, ignore-warnings). The workflow now just references it, so reverting to the upstream action once the @wordpress/env regression is fixed is a one-line `uses:` swap with an identical `with:` block. The action runs the check twice from the live environment: --format=json for the uploaded artifact and the ERROR gate (reliable), and --format=table for a readable view in the log group and the job summary. Assisted-By: AI
WP-CLI `plugin check --format=table` emits tab-separated rows (not an aligned table) over the wp-env cli container, and the previous summary heuristic misdetected findings. Run the check once as JSON and render it with a small PHP formatter that prints an aligned, file-grouped table to the log, writes a Markdown table to the job summary, and exits non-zero on blocking errors. Drops the second check run. Assisted-By: AI
…ifact WP-CLI `plugin check --format=table` emits tab-separated rows (not an aligned table) over the wp-env cli container, and the previous summary heuristic misdetected findings. Run the check once as JSON and render it with a small PHP formatter that prints an aligned, file-grouped table to the log, writes a Markdown table to the job summary, and exits non-zero on blocking errors. Drops the second check run. Also bump actions/upload-artifact v4 -> v7 to clear the Node.js 20 deprecation warning (v5+ run on Node.js 24). Assisted-By: AI
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.
Problem
Plugin Check has failed on every branch since 2026-06-08.
wordpress/plugin-check-action@v1force-installs the latest@wordpress/envat runtime (npm -g i @wordpress/env, no pin).@wordpress/env@11.8.0(2026-06-04) silently exits 0 fromwp-env startwithout bringing up the Dockerclicontainer. Sowp plugin checkruns against a non-existent environment:The check never runs → no results file → step exits 1 → job red. The action exposes no input to pin the wp-env version, and every action tag (v1.0.7 → v1.1.6) reinstalls latest at runtime, so pinning the action does not help.
Fix
Replace the action with explicit steps that mirror it but pin
@wordpress/env@11.7.0(last release before the regression):.wp-env.json(plugin-check.zip + build-dir mapping)wp plugin checkinvocation (same categories/checks/exclude-dirs/--require)ERRORrows (WP-CLIplugin checkexits 0 even on findings — verified against plugin-check source)Optimizations
testsEnvironment: false— skiptests-*containers (~half the Docker work)wp-env start --update— no forced re-fetch on a fresh runneron: pull_requestonly — avoid duplicate push+PR runs on mergeRevert path
Restore
wordpress/plugin-check-action@v1once upstream ships a fixed@wordpress/env(> 11.8.0).🤖 Generated with Claude Code