name: Code style

on: [push, pull_request]

jobs:
  run:
    runs-on: ubuntu-latest
    name: PHP/PHTML/CSS

    steps:
      - uses: actions/checkout@v1
        with:
          fetch-depth: 1

      - run: composer global require squizlabs/php_codesniffer=* --quiet

      - name: PHP
        run: ~/.composer/vendor/bin/phpcs --colors --standard=PSR12 --exclude=Generic.Files.LineLength --extensions=php index.php app modules_v4 tests

      - name: Style sheets
        run: ~/.composer/vendor/bin/phpcs --colors --extensions=css resources/css
