Create action to check against PSR12 coding standard
This commit is contained in:
parent
58d6aead69
commit
d4c1d17860
|
|
@ -0,0 +1,27 @@
|
|||
name: "CI"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- "html"
|
||||
|
||||
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: tinovyatkin/action-php-codesniffer@v1
|
||||
with:
|
||||
files: "**.php" # you may customize glob as needed
|
||||
phpcs_path: php phpcs.phar
|
||||
standard: PSR12
|
||||
Loading…
Reference in New Issue