Merge pull request #195 from olegpro/symfony-7 #315
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: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: "${{ matrix.operating-system }}" | |
strategy: | |
fail-fast: false | |
matrix: | |
operating-system: | |
- "ubuntu-20.04" | |
- "ubuntu-22.04" | |
php-version: | |
- "8.0" | |
- "8.1" | |
- "8.2" | |
steps: | |
- # Git Checkout | |
name: Checkout code | |
uses: actions/checkout@v3 | |
- # Setup PHP runtime for PHPUnit 9 tool support | |
name: Setup PHP runtime for PHPUnit 9 | |
uses: shivammathur/setup-php@v2 | |
if: ${{ matrix.php-version == '8.0' }} | |
with: | |
php-version: "${{ matrix.php-version }}" | |
tools: phpunit:9.6 | |
- # Setup PHP runtime for PHPUnit 10 tool support | |
name: Setup PHP runtime for PHPUnit 10 | |
if: ${{ matrix.php-version != '8.0' }} | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: "${{ matrix.php-version }}" | |
tools: phpunit | |
- # Install Composer dependencies | |
name: Install Composer dependencies | |
uses: ramsey/composer-install@v2 | |
with: | |
composer-options: "--prefer-dist --no-scripts" | |
- # Run unit tests | |
name: Unit tests with PHPUnit 9 | |
if: ${{ matrix.php-version == '8.0' }} | |
run: phpunit --configuration ./phpunit-9.xml --testdox --do-not-cache-result | |
- | |
name: Unit tests with PHPUnit 10 | |
if: ${{ matrix.php-version != '8.0' }} | |
run: phpunit --testdox --do-not-cache-result |