clean up CI jobs, drop jobs for unmaintained Symfony versions #285
Workflow file for this run
This file contains hidden or 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' | |
| - 'pull_request' | |
| jobs: | |
| cs-fixer: | |
| name: 'PHP CS Fixer' | |
| runs-on: 'ubuntu-latest' | |
| steps: | |
| - name: 'Check out' | |
| uses: 'actions/checkout@v4' | |
| - name: 'Set up PHP' | |
| uses: 'shivammathur/setup-php@v2' | |
| with: | |
| php-version: '8.1' | |
| coverage: 'none' | |
| - name: 'Check the code style' | |
| uses: docker://oskarstark/php-cs-fixer-ga | |
| with: | |
| args: '--diff --dry-run' | |
| phpstan: | |
| name: 'PhpStan' | |
| runs-on: 'ubuntu-latest' | |
| steps: | |
| - name: 'Check out' | |
| uses: 'actions/checkout@v4' | |
| - name: 'Set up PHP' | |
| uses: 'shivammathur/setup-php@v2' | |
| with: | |
| php-version: '8.1' | |
| coverage: 'none' | |
| - name: 'Install dependencies' | |
| uses: php-actions/composer@v6 | |
| with: | |
| php_version: '8.1' | |
| - name: 'Run PhpStan' | |
| run: | | |
| vendor/bin/phpstan analyze | |
| tests: | |
| name: 'PHPUnit' | |
| runs-on: 'ubuntu-latest' | |
| strategy: | |
| matrix: | |
| include: | |
| - php-version: '8.1' | |
| composer-options: '--prefer-stable' | |
| symfony-version: '6.4.*' | |
| - php-version: '8.2' | |
| composer-options: '--prefer-stable' | |
| symfony-version: '6.4.*' | |
| - php-version: '8.2' | |
| composer-options: '--prefer-stable' | |
| symfony-version: '7.3.*' | |
| - php-version: '8.3' | |
| composer-options: '--prefer-stable' | |
| symfony-version: '6.4.*' | |
| - php-version: '8.3' | |
| composer-options: '--prefer-stable' | |
| symfony-version: '7.3.*' | |
| - php-version: '8.4' | |
| composer-options: '--prefer-stable' | |
| symfony-version: '6.4.*' | |
| - php-version: '8.4' | |
| composer-options: '--prefer-stable' | |
| symfony-version: '7.3.*' | |
| steps: | |
| - name: 'Check out' | |
| uses: 'actions/checkout@v4' | |
| - name: 'Set up PHP' | |
| uses: 'shivammathur/setup-php@v2' | |
| with: | |
| php-version: '${{ matrix.php-version }}' | |
| coverage: 'none' | |
| tools: flex | |
| - name: 'Get Composer cache directory' | |
| id: 'composer-cache' | |
| run: 'echo "::set-output name=cache-dir::$(composer config cache-files-dir)"' | |
| - name: 'Cache dependencies' | |
| uses: 'actions/cache@v4' | |
| with: | |
| path: '${{ steps.composer-cache.outputs.cache-dir }}' | |
| key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}" | |
| restore-keys: 'php-${{ matrix.php-version }}-composer-locked-' | |
| - name: 'Install dependencies' | |
| env: | |
| SYMFONY_REQUIRE: '${{ matrix.symfony-version }}' | |
| run: | | |
| composer update --no-progress ${{ matrix.composer-options }} | |
| - name: 'Install PHPUnit' | |
| run: 'vendor/bin/simple-phpunit install' | |
| - name: 'Run tests' | |
| run: | | |
| vendor/bin/simple-phpunit --testsuite="unit tests" | |
| vendor/bin/simple-phpunit --testsuite="integration tests" |