lint.yml 941 B

12345678910111213141516171819202122232425262728293031323334353637
  1. name: "PHP Lint"
  2. on:
  3. push:
  4. pull_request:
  5. jobs:
  6. tests:
  7. name: "Lint"
  8. runs-on: ubuntu-latest
  9. strategy:
  10. matrix:
  11. php-version:
  12. - "5.3"
  13. - "8.0"
  14. steps:
  15. - name: "Checkout"
  16. uses: "actions/checkout@v2"
  17. - name: "Install PHP"
  18. uses: "shivammathur/setup-php@v2"
  19. with:
  20. coverage: "none"
  21. extensions: "intl"
  22. ini-values: "memory_limit=-1"
  23. php-version: "${{ matrix.php-version }}"
  24. - name: "Lint PHP files on 5.3"
  25. if: "matrix.php-version == '5.3'"
  26. run: "find src/ -type f -name '*.php' -not -name '*Trait.php' -not -name 'FormattableHandlerInterface.php' -not -name 'ProcessableHandlerInterface.php' -print0 | xargs -0 -L1 -P4 -- php -l -f"
  27. - name: "Lint PHP files"
  28. if: "matrix.php-version != '5.3'"
  29. run: "find src/ -type f -name '*.php' -print0 | xargs -0 -L1 -P4 -- php -l -f"