Update minimum requirements #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
'on': | |
- pull_request | |
- push | |
env: | |
LANG: C | |
jobs: | |
phpSyntaxCheck: | |
name: 'PHP Syntax Check (PHP ${{ matrix.php.version }})' | |
strategy: | |
matrix: | |
php: | |
- | |
version: '8.1' | |
experimental: false | |
- | |
version: '8.2' | |
experimental: false | |
- | |
version: '8.3' | |
experimental: false | |
- | |
version: '8.4' | |
experimental: true | |
runs-on: ubuntu-24.04 | |
steps: | |
- | |
uses: actions/checkout@v4 | |
- | |
name: 'Set up PHP ${{ matrix.php.version }}' | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '${{ matrix.php.version }}' | |
- | |
name: 'Syntax check' | |
continue-on-error: '${{ matrix.php.experimental }}' | |
run: | | |
find . \( -type d \( -name '.git' -or -name 'vendor' \) -prune \) -or \( -type f -name '*.php' -print \) \ | |
| sort \ | |
| xargs ${{ matrix.php.version >= 8.3 && ' ' || '-n 1'}} php -l | |
phpStyleCheck: | |
name: 'PHP Coding Style' | |
runs-on: ubuntu-24.04 | |
steps: | |
- | |
uses: actions/checkout@v4 | |
- | |
name: 'Set up PHP 8.1' | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.1' | |
- | |
name: 'Install PHP dependencies' | |
run: 'composer install --prefer-dist' | |
- | |
name: 'Run PHPCS' | |
run: | | |
vendor/bin/phpcs | |
- | |
name: 'Run PHPStan' | |
continue-on-error: true | |
run: | | |
vendor/bin/phpstan analyze --memory-limit=1G | |
phpTest: | |
name: 'PHP test (${{ matrix.php.version }})' | |
strategy: | |
matrix: | |
php: | |
- | |
version: '8.1' | |
experimental: false | |
- | |
version: '8.2' | |
experimental: false | |
- | |
version: '8.3' | |
experimental: false | |
- | |
version: '8.4' | |
experimental: true | |
runs-on: ubuntu-24.04 | |
continue-on-error: '${{ matrix.php.experimental }}' | |
steps: | |
- | |
uses: actions/checkout@v4 | |
- | |
name: 'Set up PHP ${{ matrix.php.version }}' | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '${{ matrix.php.version }}' | |
- | |
name: 'Install packages' | |
run: | | |
composer install --prefer-dist | |
- | |
name: 'Run test' | |
run: | | |
vendor/bin/phpunit |