Skip to content
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

Add workflow to run PHP compat testing #22

Merged
merged 3 commits into from Oct 18, 2023
Merged

Add workflow to run PHP compat testing #22

merged 3 commits into from Oct 18, 2023

Conversation

dkotter
Copy link
Collaborator

@dkotter dkotter commented Oct 18, 2023

Description of the Change

Adds our (semi) standard workflow to run PHP compatibility scanning. While this can run as part of the PHPCS scanning, this PR removes the PHPCompatibilityWP standard from our normal PHPCS scanning and adds a new workflow just for that. Open to opinions on if these should be separated or not, the one benefit is it makes it clear when there's a normal PHPCS issue and when there's a compatibility issue.

This compat Action does the following:

  • Runs anytime a PR is opened against develop or code is pushed to develop or trunk
  • Only runs if PHP files have been changed
  • Sets up PHP version 7.4 (our minimum), runs composer install and then lints any of the changed PHP files, using our php-compat.xml standard

Closes #16

How to test the Change

Can see a commit with no PHP changes here: https://github.com/10up/block-catalog/pull/22/checks?sha=010716195d0bb33168772f5c709d40035263b288

Can see a commit with a failing PHP compat check but successful PHPCS check here: https://github.com/10up/block-catalog/pull/22/checks?sha=1ab8288f9996fc7e104876f272d7518f835445d3

Changelog Entry

Added - Workflow to run PHP compatibility scanning.

Credits

Props @dkotter

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@dkotter dkotter added this to the 1.5.1 milestone Oct 18, 2023
@dkotter dkotter self-assigned this Oct 18, 2023
@dkotter dkotter marked this pull request as ready for review October 18, 2023 17:03
@dkotter dkotter requested review from jeffpaul, dsawardekar and a team as code owners October 18, 2023 17:03
Copy link
Member

@jeffpaul jeffpaul left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for getting this added in!

@dkotter dkotter merged commit eed703e into develop Oct 18, 2023
2 checks passed
@dkotter dkotter deleted the fix/16 branch October 18, 2023 19:12
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.

Add/GitHub action - php8 compat
2 participants