phpcs.yml 801 B

123456789101112131415161718192021222324252627282930
  1. name: "PHPCS"
  2. on:
  3. pull_request:
  4. paths:
  5. - "**.php"
  6. - "phpcs.xml"
  7. - ".github/workflows/phpcs.yml"
  8. jobs:
  9. phpcs:
  10. runs-on: ubuntu-latest
  11. steps:
  12. - uses: actions/checkout@v4
  13. with:
  14. fetch-depth: 50 # important!
  15. # we may use whatever way to install phpcs, just specify the path on the next step
  16. # however, curl seems to be the fastest
  17. - name: Install PHP_CodeSniffer
  18. run: |
  19. curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar
  20. php phpcs.phar --version
  21. - uses: thenabeel/action-phpcs@v8
  22. with:
  23. files: "**.php" # you may customize glob as needed
  24. phpcs_path: php phpcs.phar
  25. standard: dev/setup/codesniffer/ruleset.xml
  26. fail_on_warnings: false