lint.yml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. name: Lint
  2. on:
  3. push:
  4. branches:
  5. - "master"
  6. pull_request:
  7. branches:
  8. - "*"
  9. jobs:
  10. lint:
  11. runs-on: ubuntu-latest
  12. steps:
  13. - name: Checkout
  14. uses: actions/checkout@v2
  15. - name: Setup PHP
  16. uses: shivammathur/setup-php@v2
  17. with:
  18. php-version: "7.1"
  19. extensions: intl, mbstring, mcrypt, openssl
  20. tools: composer
  21. - name: Setup problem matchers
  22. run: |
  23. echo "::add-matcher::${{ runner.tool_cache }}/php.json"
  24. - name: Cache Composer packages
  25. id: composer-cache
  26. uses: actions/cache@v2
  27. with:
  28. path: vendor
  29. key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
  30. restore-keys: |
  31. ${{ runner.os }}-php-
  32. - name: Install dependencies
  33. if: steps.composer-cache.outputs.cache-hit != 'true'
  34. run: composer install --prefer-dist --no-progress --no-suggest
  35. - name: PHPCS check
  36. uses: chekalsky/phpcs-action@v1
  37. with:
  38. enable_warnings: true
  39. phpcs_bin_path: "./vendor/bin/phpcs"