Skip to content

Feature/add Phpcs Workflow#22

Merged
jasperf merged 8 commits into
mainfrom
feature/add-phpcs-workflow
May 27, 2026
Merged

Feature/add Phpcs Workflow#22
jasperf merged 8 commits into
mainfrom
feature/add-phpcs-workflow

Conversation

@jasperf

@jasperf jasperf commented May 27, 2026

Copy link
Copy Markdown
Contributor

This release (v1.4.1) introduces automated PHP code quality enforcement via GitHub Actions, adding a PHPCS workflow and refining the existing plugin-check CI pipeline. Two new workflow files — wpcs.yml for WordPress Coding Standards linting and an updated plugin-check.yml — establish a baseline for static analysis on every push. The plugin-check workflow was rewritten with explicit wp-env setup steps to improve reliability and reproducibility in the CI environment. Changelog and readme documentation were updated to reflect these additions accurately.

CI/CD Infrastructure:

  • Added wpcs.yml GitHub Actions workflow to run PHP_CodeSniffer against WordPress Coding Standards, providing automated style and quality gates on the codebase.
  • Rewrote plugin-check.yml with explicit wp-env initialization steps, replacing implicit environment assumptions with deterministic setup to reduce flaky runs.
  • Removed a redundant wpcs.yml workflow that was introduced during the initial scaffolding, consolidating linting into a single, canonical workflow file.

Release and Documentation:

  • Bumped plugin version to v1.4.1 in warder-cookie-consent.php to reflect the CI infrastructure additions as a minor maintenance release.
  • Updated CHANGELOG.md and readme.txt with corrected entries for this release, fixing inaccuracies introduced in earlier draft commits.

Files Changed:

jasperf added 4 commits May 27, 2026 07:39
phpcs.yml already covers WordPress coding standards with proper text domain
configuration, making wpcs.yml duplicate work.
Rename phpcs.yml back to wpcs.yml for clarity — the workflow enforces
WordPress Coding Standards, not generic PHPCS. Update CHANGELOG.md and
readme.txt to say "Changed/Replaced" instead of "Added", naming the
replaced 10up/wpcs-action and the specific sniffs now enforced.

Co-Authored-By: Jasper Frumau <jasper@imagewize.com>
@imagewize imagewize deleted a comment from github-actions Bot May 27, 2026
jasperf added 4 commits May 27, 2026 08:15
Replace plugin-check-action@v1 with manual wp-env setup to fix silent
wp-env start failures and incorrect artifact upload path.
Add tee to capture wp plugin check output and upload it via
actions/upload-artifact@v4 so results are available from the
workflow summary after each run.
Show all available Plugin Check checks in the log before running
so it is clear what was evaluated on each run.
wp plugin check does not support a --list-checks flag; remove the
step that was causing the workflow to fail with exit code 1.
@jasperf
jasperf merged commit b179560 into main May 27, 2026
2 checks passed
@jasperf
jasperf deleted the feature/add-phpcs-workflow branch May 27, 2026 01:53
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