Today I came across a really useful set of tools. Magento 2 github actions:
https://github.com/extdn/github-actions-m2
Which means you can run a github action workflows to scan your code for Magento coding standard. For example:
https://github.com/yireo/Yireo_Webp2/blob/master/.github/workflows/extdn-static-tests.yml
.github/workflows/extdn-static-tests.yml
name: ExtDN Static Tests
on: [push]
jobs:
static:
name: Static Code Analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: extdn/github-actions-m2/magento-coding-standard@master
Pretty amazing. However I would also like a github action to scan Magento 2 extension using PHPCompatibility standard for a defined set of php versions.
For example locally the command would look a bit like this
vendor/squizlabs/php_codesniffer/bin/phpcs --standard=PHPCompatibility --runtime-set testVersion 7.0-7.4 --colors --warning-severity=0 --report=full,summary --extensions=php,phtml ./
I've had a few goes but I can't get the syntax right.
Has someone somewhere got a github action which does the above?