graycoreio / github-actions-magento2

Github Actions and Workflows that make maintaining Magento2 projects and modules easier.
44 stars 11 forks source link

[FEAT] Magento Coding Standards / PHP Compatibility tests #27

Closed ihor-sviziev closed 1 year ago

ihor-sviziev commented 2 years ago

:bulb: Feature request

Feature Name

Run Magento Coding Standards on top of my module(s)

The Desired Behavior

I'd like to have the ability to run the Magento Coding Standards static test for my module from the module' or from the project's repository. In addition to that, I'd like to select the Coding Standard version.

Also, I would like to have the ability to run PHP compatibility tests.

https://github.com/magento/magento-coding-standard https://github.com/PHPCompatibility/PHPCompatibility

Note: here are the examples: https://github.com/extdn/github-actions-m2/tree/master/magento-coding-standard https://github.com/extdn/github-actions-m2/tree/master/magento-copy-paste-detector https://github.com/extdn/github-actions-m2/tree/master/magento-mess-detector https://github.com/extdn/github-actions-m2/tree/master/magento-phpstan https://github.com/extdn/github-actions-m2/tree/master/php-compatibility

They are based on docker and do not support configuring the standard coding version, for instance.

TODO:

Your Use Case

Prior Work

Environment


Magento version: X.Y.Z 
PHP Version version: X.Y.Z 


Others:

damienwebdev commented 2 years ago

@ihor-sviziev could you outline a potential YAML file you'd like to see for such an action? Would you prefer a workflow or an action?

damienwebdev commented 2 years ago

Partially fixed by #51 @ihor-sviziev can you give this a try?

ihor-sviziev commented 2 years ago

@damienwebdev I just checked - in general looks good. The only thing is missing for me - ability to add additional phpcs params, for instance --ignore='*/js/lib/*'

Also, on PRs would be great to add a comments like in https://github.com/chekalsky/phpcs-action

damienwebdev commented 2 years ago

@ihor-sviziev moving that to a separate issue.

damienwebdev commented 1 year ago

Closing in favor of https://github.com/mage-os/github-actions/issues/10