Run WordPress Plugin Check in CI#49
Merged
Merged
Conversation
Runs the same lint suite the WordPress.org plugin directory's
automated review applies on submission — `readme.txt` field checks,
license-header drift, forbidden function calls, and similar
guideline violations — at PR time instead of at submission time.
Pieces that work together:
- `.wp-env.json` is updated to track `WordPress/WordPress` (latest
trunk) instead of the pinned `wordpress-7.0-RC2.zip` URL. Trunk
is where the plugin needs to keep working anyway, and the pin
produced a compose file the cli service didn't initialize
cleanly from.
- The workflow installs `@wordpress/env@11.7.0` globally (matching
Performance Lab) and writes `~/.composer/auth.json` with the
workflow's GITHUB_TOKEN before `wp-env start` so the Docker
build's GitHub-API calls aren't throttled by the unauthenticated
60/hour rate limit.
- The plugin is rebuilt via rsync + `.distignore` before being
mounted into wp-env, so plugin-check sees only what would ship —
excluding `.wp-env.json`, `*.dist` configs, tests, and other
dev files that wouldn't be in the distributed zip.
- `wp plugin check ... --format=github` renders findings as inline
PR diff annotations.
Skips `WordPress/plugin-check-action@v1` entirely — it bundles its
own wp-env invocation that consistently failed with 'service "cli"
is not running' against wp-env 11.7.0. Calling `wp-env run cli wp
plugin check` directly is simpler and more debuggable.
9d8c48e to
031d64a
Compare
|
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 Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
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.
Replaces the long-form heredoc that wrote
~/.composer/auth.jsonby hand with the documentedcomposer config --global --authpattern. Same end-result file (which wp-env mounts into its Docker build), one line of code instead of seven.Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 4.7
Used for: Swapping the heredoc for the composer-config equivalent in the plugin-check workflow. All changes were reviewed and verified by me.