-
Notifications
You must be signed in to change notification settings - Fork 139
Add Plugin Check workflow and remove local plugin-check dependency #2320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Conversation
Port changes from WordPress/ai#139 to transition from the local wpackagist-plugin/plugin-check dependency to the official wordpress/plugin-check-action GitHub Action. - Add .github/workflows/plugin-check.yml. - Remove wpackagist-plugin/plugin-check from composer.json. - Remove related rules from tools/phpcs/phpcs.ruleset.xml. - Add PHPCS exclusion for object-cache.copy.php filename to allow drop-in naming. Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: felixarntz <flixos90@git.wordpress.org> Co-authored-by: JasonTheAdams <jason_the_adams@git.wordpress.org> Co-authored-by: justlevine <justlevine@git.wordpress.org> Co-authored-by: dkotter <dkotter@git.wordpress.org> Co-authored-by: westonruter <westonruter@git.wordpress.org> Co-authored-by: jeffpaul <jeffpaul@git.wordpress.org>
|
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## trunk #2320 +/- ##
==========================================
- Coverage 68.85% 68.80% -0.05%
==========================================
Files 90 90
Lines 7612 7621 +9
==========================================
+ Hits 5241 5244 +3
- Misses 2371 2377 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This introduces a 'prepare-matrix' job to dynamically extract the list of plugins from 'plugins.json'. The 'plugin-check' job then uses this list to run checks in parallel via a matrix strategy, building and checking each plugin separately from its own directory in 'build/'. This fixes an issue where the check was being run on the entire root directory instead of the specific plugin build artifacts. Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
|
It doesn't seem that the plugin-check action is set up to work in a monorepo of multiple plugins. Specifically the last step of the action is: - name: Upload artifact
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
if: ${{ always() }}
with:
name: plugin-check-results
path: ${{ runner.temp }}/plugin-check-results.txt
if-no-files-found: ignoreThis is causing problems when plugin-check is running in parallel for multiple plugins. Most of the jobs fail here with:
For the last job in the matrix, it succeeds with:
It seems like the - name: plugin-check-results
+ name: plugin-check-results${{ inputs.slug ? '-' + inputs.slug : '' }} |
…nPrefixedVariableFound
…meFound for intentionally-applied core filters
Move the dependency installation and build process to the preparatory job and share the results via artifacts. This avoids redundant `npm ci` and build steps for every plugin in the matrix, significantly reducing workflow execution time and resource usage. Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Summary
Closes #2257
Provided by Gemini 3 in gemini-cli:
Additionally, the plugins have been updated to address various issues that Plugin Check identified.
To do
defaulttext domain, for example: Mismatched text domain. Expected 'dominant-color-images' but got 'default'.Use of AI Tools
Given that I'm adapting a PR from the AI experiments plugin, it felt especially appropriate to use AI to prepare this PR. I used gemini-cli with these key prompts:
"phpcompatibility/php-compatibility": "^9.3"to"phpcompatibility/phpcompatibility-wp": "^3.0.0-alpha"seems out of scope. I think that should be undone. The same goes for replacingPHPCompatibilitywithPHPCompatibilityWPinphpcs.ruleset.xml.github/workflows/plugin-check.ymlisn't working right. It needs to run do the Run plugin check for each of the subdirectories inside ofbuildnot on the entire root directory..github/workflows/plugin-check.ymlwhere it seems to be re-building all plugins multiple times and maybe even running composer install and npm ci. Should these be moved to steps under prepare-matrix?I've provided attribution to the original authors of that AI Experiments PR via
Co-authored-bytrailers in the commit message. I've also prop'ed Gemini.