Skip to content

update CI actions

update CI actions #4

Workflow file for this run

name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['8.1', '8.4', '8.5']
symfony-version: ['5.4.*', '6.4.*', '7.0.*']
doctrine-orm-version: ['2.20.*', '3.0.*']
exclude:
# Symfony 5.4 is not compatible with PHP 8.3
- php-version: '8.3'
symfony-version: '5.4.*'
# Symfony 6.4 is not compatible with PHP 8.1
- php-version: '8.1'
symfony-version: '6.4.*'
# Symfony 7.0 is not compatible with PHP 8.1 and 8.2
- php-version: '8.1'
symfony-version: '7.0.*'
- php-version: '8.2'
symfony-version: '7.0.*'
# Doctrine 3.0 requires PHP 8.4 or higher
- php-version: '8.1'
doctrine-orm-version: '3.0.*'
name: PHP v${{ matrix.php-version }} - SF v${{ matrix.symfony-version }} - Doctrine ORM v${{ matrix.doctrine-orm-version }}
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, sqlite3
coverage: none
- name: Install Composer dependencies
uses: ramsey/composer-install@v3
with:
composer-options: "--prefer-dist --no-progress --no-interaction --optimize-autoloader"
- name: Run PHP-CS-Fixer
if: matrix.php-version == '8.5' && matrix.symfony-version == '7.0.*'
run: vendor/bin/php-cs-fixer fix --dry-run --stop-on-violation --using-cache=no
- name: Run PHPStan
if: matrix.php-version == '8.5' && matrix.symfony-version == '7.0.*'
run: vendor/bin/phpstan analyse src tests --configuration=phpstan-8.5-plus.neon --memory-limit=1G
- name: Run PHPUnit tests
run: vendor/bin/phpunit