Switch plugin-check runtime from wp-env to WordPress Playground#563
Switch plugin-check runtime from wp-env to WordPress Playground#563Copilot wants to merge 11 commits into
Conversation
Agent-Logs-Url: https://github.com/WordPress/plugin-check-action/sessions/776136e4-834c-48c6-a2bd-8a8d5eb16301 Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
🔍 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
Agent-Logs-Url: https://github.com/WordPress/plugin-check-action/sessions/776136e4-834c-48c6-a2bd-8a8d5eb16301 Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Agent-Logs-Url: https://github.com/WordPress/plugin-check-action/sessions/776136e4-834c-48c6-a2bd-8a8d5eb16301 Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Agent-Logs-Url: https://github.com/WordPress/plugin-check-action/sessions/776136e4-834c-48c6-a2bd-8a8d5eb16301 Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Agent-Logs-Url: https://github.com/WordPress/plugin-check-action/sessions/776136e4-834c-48c6-a2bd-8a8d5eb16301 Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR migrates the action’s runtime from @wordpress/env (wp-env) to WordPress Playground via @wp-playground/cli, and introduces an optional “blueprint” input that gets merged into a generated baseline blueprint used to install/activate Plugin Check and the target plugin (plus declared dependencies).
Changes:
- Replaced the wp-env startup/run flow with a Playground CLI invocation driven by a generated blueprint.
- Added
blueprintinput support and merge logic to let callers layer additional Playground setup steps. - Extended the test workflow with a fixture to exercise custom blueprint usage.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
action.yml |
Implements Playground-based execution, blueprint generation/merging, dependency handling, and blueprint exclusion behavior. |
README.md |
Documents Playground-based setup and the new blueprint input with an example. |
.github/workflows/test.yml |
Adds a workflow step to exercise the custom blueprint input against a fixture plugin. |
tests/fixtures/custom-blueprint.json |
Adds a minimal Playground blueprint used by the workflow fixture. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@copilot apply changes based on the comments in this thread |
Agent-Logs-Url: https://github.com/WordPress/plugin-check-action/sessions/a4d45201-a265-451d-baa7-4819810751be Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Agent-Logs-Url: https://github.com/WordPress/plugin-check-action/sessions/a4d45201-a265-451d-baa7-4819810751be Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Applied the follow-up changes in bf3a010 and 497bd76. The action now pins |
|
@copilot actually i prefer installing and updating playground via package.json instead of hardcoding a version number |
Agent-Logs-Url: https://github.com/WordPress/plugin-check-action/sessions/5cd1d914-138f-4065-a76f-14c27b1e9f34 Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Agent-Logs-Url: https://github.com/WordPress/plugin-check-action/sessions/5cd1d914-138f-4065-a76f-14c27b1e9f34 Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Updated in b82030a and 620eaa6. The Playground CLI version now lives in package.json/package-lock.json, and action.yml reads it from the action’s own package metadata instead of hardcoding the version. |
This updates the action to use WordPress Playground instead of
@wordpress/envfor bootstrapping Plugin Check. It also adds support for merging a user-provided Playground blueprint so plugins can extend runtime setup when needed.Playground-based runtime
wp-envstartup flow inaction.ymlwith@wp-playground/cli phpplugin-checkplugin-checkobject-cache.phpdrop-in required by Plugin CheckCustom blueprint support
blueprintinputPlugin dependency handling
Requires Pluginsfrom the plugin headerScan hygiene
Docs and coverage
blueprintinput inREADME.mdExample:
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
api.wordpress.org/usr/local/bin/node node /home/REDACTED/.npm/_npx/8ab79f7a2a3f35a4/node_modules/.bin/wp-playground-cli php --blueprint=/tmp/plugin-check-blueprint.json --mount=/home/REDACTED/work/plugin-check-action/plugin-check-action/tests/fixtures/hello-dolly-copy:/wordpress/wp-content/plugins/hello-dolly-copy --verbosity=normal -- /tmp/wp-cli.phar plugin check hello-dolly-copy --categories=plugin_repo --format=json --error-severity=7 --warning-severity=6 --include-low-severity-errors --exclude-checks=prefixing(dns block)konstantin.obenland.it/home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js(dns block)If you need me to access, download, or install something from one of these locations, you can either: