Skip to content

Run WordPress Plugin Check in CI#49

Merged
josephfusco merged 1 commit into
mainfrom
chore/plugin-check-ci
Jun 10, 2026
Merged

Run WordPress Plugin Check in CI#49
josephfusco merged 1 commit into
mainfrom
chore/plugin-check-ci

Conversation

@josephfusco

@josephfusco josephfusco commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Replaces the long-form heredoc that wrote ~/.composer/auth.json by hand with the documented composer config --global --auth pattern. 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.

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.
@josephfusco josephfusco force-pushed the chore/plugin-check-ci branch from 9d8c48e to 031d64a Compare June 10, 2026 19:40
@josephfusco josephfusco marked this pull request as ready for review June 10, 2026 19:44
@github-actions

Copy link
Copy Markdown

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 props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props joefusco.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@josephfusco josephfusco merged commit bde2a88 into main Jun 10, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant