Skip to content

Run CI with PHP 8.4

Run CI with PHP 8.4 #3

Workflow file for this run

name: CI
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['8.1', '8.4']
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
- name: Print PHP version
run: php -v
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Validate composer.json
run: composer validate
- name: Install dependencies
run: composer install --optimize-autoloader --no-progress --no-interaction --prefer-dist
- name: Run tests
run: vendor/bin/phpunit --testdox
- name: Run PHPStan
run: vendor/bin/phpstan analyse --level 8 --no-interaction --no-progress src
- name: Run PHPCS
run: vendor/bin/phpcs src tests --standard=psr2 -s