Skip to content

Update GitHub actions, update PHPStan baseline #20

Update GitHub actions, update PHPStan baseline

Update GitHub actions, update PHPStan baseline #20

name: Continuous Integration
on:
pull_request:
branches: ["*.x"]
push:
branches: ["*.x"]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
phpunit:
name: PHPUnit (PHP ${{ matrix.php-version }} - Symfony ${{ matrix.symfony-version }})
runs-on: ubuntu-24.04
continue-on-error: ${{ matrix.continue-on-error || false }}
env:
SYMFONY_REQUIRE: ${{ matrix.symfony-version }}
strategy:
matrix:
php-version:
- '8.4'
- '8.5'
symfony-version:
- '7.4.*'
- '8.0.*'
- '8.1.*'
include:
- php-version: '8.5'
symfony-version: '8.2.*@dev'
continue-on-error: true
steps:
- name: Checkout code
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
fetch-depth: 2
- name: Install PHP with pcov
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
with:
coverage: pcov
php-version: ${{ matrix.php-version }}
tools: flex
- name: Install Imagemagick
run: sudo apt-get update && sudo apt-get install -y imagemagick
- name: Configure Composer minimum-stability for dev versions
if: contains(matrix.symfony-version, 'dev')
run: composer config minimum-stability dev
- name: Install Composer dependencies
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
- name: Run PHPUnit
run: vendor/bin/phpunit --coverage-clover=coverage.xml
- name: Upload to Codecov
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
if: matrix.php-version == '8.4' && matrix.symfony-version == '7.4.*'