38 lines
1007 B
YAML
38 lines
1007 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
jobs:
|
|
php-lint:
|
|
name: PHP lint (${{ matrix.php-version }})
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
php-version: ['7.4', '8.1']
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: ${{ matrix.php-version }}
|
|
- name: Run PHP lint
|
|
run: find . -path './vendor' -prune -o -name '*.php' -print0 | xargs -0 -n1 php -l
|
|
|
|
coding-standards:
|
|
name: Coding standards
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: '8.1'
|
|
- uses: actions/cache@v4
|
|
with:
|
|
path: vendor
|
|
key: php-8.1-${{ hashFiles('composer.lock') }}
|
|
- name: Install dependencies
|
|
run: composer install --no-interaction --no-progress --prefer-dist
|
|
- name: Run PHP-CS-Fixer
|
|
run: ./vendor/bin/php-cs-fixer fix --dry-run --diff --using-cache=no
|