Skip to content

Sugo integration

Sugo integration #1

name: Lint pull requests
on:
pull_request:
paths:
- "**.php"
- "**.js"
- "**.css"
- "phpcs.xml"
- ".github/workflows/phpcs_pull_request.yml"
jobs:
phpcs:
runs-on: ubuntu-latest
strategy:
matrix:
php: ['latest']
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
# Doesn't work in PRs
# - name: Cache Composer dependencies
# uses: actions/cache@v2
# with:
# path: /tmp/composer-cache
# key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
- name: Install dependencies
uses: php-actions/composer@v6
with:
args: --ignore-platform-reqs
# php_extensions: ldap mbstring json sqlite3
php_version: "${{ matrix.php }}"
- name: PHPCS linting
uses: thenabeel/action-phpcs@v8
with:
standard: phpcs.xml
files: "src/*,public/*,templates/*"
phpcs_path: vendor/bin/phpcs
fail_on_warnings: true