Add plugin dependencies (#173) #149
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: WordPress Coding Standards | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- '**.php' | |
- 'phpcs.xml' | |
- '.github/workflows/coding-standards.yml' | |
pull_request: | |
branches: | |
- master | |
paths: | |
- '**.php' | |
- 'phpcs.xml' | |
- '.github/workflows/coding-standards.yml' | |
jobs: | |
phpcs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 # important! | |
# we may use whatever way to install phpcs, just specify the path on the next step | |
# however, curl seems to be the fastest | |
- name: Install PHP_CodeSniffer | |
run: | | |
curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar | |
php phpcs.phar --version | |
- uses: thenabeel/action-phpcs@v8 | |
with: | |
files: '**.php' # you may customize glob as needed | |
phpcs_path: php phpcs.phar | |
standard: phpcs.xml |