Merge pull request #307 from Seb33300/master #66
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: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
ewz: | |
name: Symfony ${{ matrix.symfony }} (PHP ${{ matrix.php }}) | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
php: [7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2] | |
symfony: [2.8, 3.4, 4.4, 5.2, 6.0, 7.0] | |
exclude: | |
# Symfony 5 requires PHP >= 7.2 | |
- php: 7.1 | |
symfony: 5.2 | |
# Symfony 6 requires PHP >= 8.0 | |
- php: 7.1 | |
symfony: 6.0 | |
- php: 7.2 | |
symfony: 6.0 | |
- php: 7.3 | |
symfony: 6.0 | |
- php: 7.4 | |
symfony: 6.0 | |
# Symfony 7 requires PHP >= 8.2 | |
- php: 7.1 | |
symfony: 7.0 | |
- php: 7.2 | |
symfony: 7.0 | |
- php: 7.3 | |
symfony: 7.0 | |
- php: 7.4 | |
symfony: 7.0 | |
- php: 8.0 | |
symfony: 7.0 | |
- php: 8.1 | |
symfony: 7.0 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
tools: composer:v2 | |
- name: Get composer cache directory | |
id: composer-cache | |
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: Cache composer dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} | |
restore-keys: ${{ runner.os }}-${{ matrix.php }}-composer- | |
- name: Install dependencies | |
run: | | |
composer require "symfony/form:^${{ matrix.symfony }}" --no-update | |
composer require "symfony/framework-bundle:^${{ matrix.symfony }}" --no-update | |
composer require "symfony/security-bundle:^${{ matrix.symfony }}" --no-update | |
composer require "symfony/validator:^${{ matrix.symfony }}" --no-update | |
- name: Install dependencies PHP | |
run: | | |
composer install | |
- name: Run tests | |
run: vendor/bin/phpunit |