Symfony 7 support #8
Workflow file for this run
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: | |
workflow_dispatch: ~ | |
push: | |
branches: | |
- master | |
pull_request: ~ | |
jobs: | |
lint: | |
name: Lint | |
runs-on: 'ubuntu-latest' | |
timeout-minutes: 5 | |
steps: | |
- name: 'Checkout' | |
uses: actions/checkout@v2 | |
- name: 'Setup PHP' | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.3' | |
- name: 'Install dependencies' | |
run: | | |
make install | |
vendor/bin/simple-phpunit --version | |
- name: 'Check style' | |
run: make lint | |
test: | |
name: ${{ matrix.name }} | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 8 | |
continue-on-error: ${{ matrix.allow-failure == 1 }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
# Lowest deps | |
- name: 'Test lowest deps Symfony 5.4 [Linux, PHP 7.4]' | |
os: 'ubuntu-latest' | |
php: '7.4' | |
symfony: '5.4.*@dev' | |
composer-flags: '--prefer-lowest' | |
allow-unstable: true | |
# Most recent versions | |
- name: 'Test Symfony 5.4 [Linux, PHP 8.0]' | |
os: 'ubuntu-latest' | |
php: '8.0' | |
symfony: '5.4.*@dev' | |
allow-unstable: true | |
- name: 'Test Symfony 6.0 [Linux, PHP 8.1]' | |
os: 'ubuntu-latest' | |
php: '8.1' | |
symfony: '6.0.*@dev' | |
allow-unstable: true | |
- name: 'Test next Symfony 6.4 [Linux, PHP 8.2]' | |
os: 'ubuntu-latest' | |
php: '8.2' | |
symfony: '6.4.*@dev' | |
allow-unstable: true | |
# Bleeding edge (unreleased dev versions where failures are allowed) | |
- name: 'Test next Symfony [Linux, PHP 8.3] (allowed failure)' | |
os: 'ubuntu-latest' | |
php: '8.3' | |
symfony: '7.0.*@dev' | |
composer-flags: '--ignore-platform-req php' | |
allow-unstable: true | |
allow-failure: true | |
steps: | |
- name: 'Set git to use LF' | |
run: | | |
git config --global core.autocrlf false | |
git config --global core.eol lf | |
- name: 'Checkout' | |
uses: actions/checkout@v2 | |
- name: 'Setup PHP' | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: pdo_sqlite | |
coverage: pcov | |
tools: 'composer:v2,flex' | |
- name: 'Get composer cache directory' | |
id: composer-cache | |
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: 'Cache dependencies' | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-${{ hashFiles('**/composer.json') }}-flags-${{ matrix.composer-flags }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: 'Allow unstable packages' | |
run: composer config minimum-stability dev | |
if: ${{ matrix.allow-unstable }} | |
- name: 'Install dependencies' | |
run: composer update --prefer-dist ${{ matrix.composer-flags }} --ansi | |
env: | |
SYMFONY_REQUIRE: "${{ matrix.symfony }}" | |
- name: 'Run PHPUnit tests' | |
run: vendor/bin/simple-phpunit --testdox --verbose ${{ matrix.code-coverage && '--coverage-text --coverage-clover build/logs/clover.xml' }} |