Skip to content

Setup ci/cd for coding standards - #325

Open
dhruvang21 wants to merge 1 commit into
WordPress:masterfrom
dhruvang21:feat/274
Open

Setup ci/cd for coding standards#325
dhruvang21 wants to merge 1 commit into
WordPress:masterfrom
dhruvang21:feat/274

Conversation

@dhruvang21

Copy link
Copy Markdown
Contributor

Add CI pipeline with coding standards and PHPUnit test workflows

Summary

Implements the CI/CD pipeline proposed in #274.

  • coding-standards.yml two jobs run on every PR and push to master:
  • lint runs php -l across all PHP files to catch syntax errors (addresses Parse error in test.php (unclosed braces?) #271)
  • phpcs runs PHP_CodeSniffer with WordPress Coding Standards and reports violations inline as PR annotations via cs2pr (addresses Multi PHP + Multi Environment + Check all commits #212)
  • phpunit-tests.yml spins up a MySQL 8.0 service container and runs the full prepare → test → report → cleanup cycle across a PHP matrix (7.4, 8.0, 8.2) to simulate hosting environments
  • composer.json adds squizlabs/php_codesniffer and wp-coding-standards/wpcs as dev dependencies with composer lint, composer lint:errors, and composer format scripts matching WordPress develop conventions
  • dependabot.yml adds weekly Composer package update checks alongside the existing daily GitHub Actions checks
  • .gitignore excludes .cache/ (PHPCS scan cache)

@github-actions

github-actions Bot commented Jun 30, 2026

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.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: dhruvang21 <dhruvang21@git.wordpress.org>
Co-authored-by: kittenkamala <amykamala@git.wordpress.org>

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

@kittenkamala kittenkamala left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for doing this @dhruvang21! Will you do me a favor and separate the lint fix commit out into a separate PR so the two changes can be reviewed and merged independently?

ac66fde

ty!!

@dhruvang21

Copy link
Copy Markdown
Contributor Author

@kittenkamala i have created the separate PR #326 to review the lint fixes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants