Change min. req. to PHP 8.1 #50
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': | |
- push | |
- pull_request | |
jobs: | |
phpSyntaxCheck: | |
name: 'PHP Syntax Check (PHP ${{ matrix.envconf.php }})' | |
strategy: | |
matrix: | |
envconf: | |
- | |
php: '8.1' | |
- | |
php: '8.2' | |
- | |
php: '8.3' | |
- | |
php: '8.4' | |
runs-on: ubuntu-22.04 | |
steps: | |
- | |
uses: actions/checkout@v4 | |
- | |
name: 'Set up PHP version ${{ matrix.envconf.php }}' | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '${{ matrix.envconf.php }}' | |
- | |
name: 'Syntax check' | |
run: | | |
php -v | |
find . \( -type d \( -name '.git' -or -name 'vendor' \) -prune \) -or \( -type f -name '*.php' -print \) | \ | |
LANG=C sort | \ | |
xargs ${{ matrix.envconf.php >= 8.3 && ' ' || '-n 1'}} php -l | |
phpStyleCheck: | |
name: 'PHP Coding Style' | |
runs-on: ubuntu-22.04 | |
steps: | |
- | |
uses: actions/checkout@v4 | |
- | |
name: 'Set up PHP version 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 | |
phpStan: | |
name: 'PHP Static Analysis' | |
runs-on: ubuntu-22.04 | |
steps: | |
- | |
uses: actions/checkout@v4 | |
- | |
name: 'Set up PHP version 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/phpstan | |
phpTest: | |
name: 'PHP Test (PHP ${{ matrix.envconf.php }})' | |
strategy: | |
matrix: | |
envconf: | |
- | |
php: '8.1' | |
- | |
php: '8.2' | |
- | |
php: '8.3' | |
- | |
php: '8.4' | |
runs-on: ubuntu-22.04 | |
steps: | |
- | |
uses: actions/checkout@v4 | |
- | |
name: 'Set up PHP version ${{ matrix.envconf.php }}' | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '${{ matrix.envconf.php }}' | |
- | |
name: 'Install PHP dependencies' | |
run: 'composer install --prefer-dist' | |
- | |
name: 'Run test' | |
run: vendor/bin/phpunit | |
env: | |
XDEBUG_MODE: coverage |