Fix PHPUnit 11 compatibility #257
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: | |
pull_request: null | |
push: | |
branches: | |
- 1.x | |
- 2.x | |
schedule: | |
- cron: "42 7 * * 1" | |
env: | |
COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.COMPOSER_AUTH }}"}}' | |
jobs: | |
Tests: | |
runs-on: 'ubuntu-latest' | |
env: | |
SYMFONY_DEPRECATIONS_HELPER: disabled | |
strategy: | |
matrix: | |
php: | |
- '8.1' | |
- '8.2' | |
- '8.3' | |
dependencies: ['highest'] | |
coverage: ['xdebug'] | |
phpunit: [false] | |
include: | |
- description: 'PHPUnit 11' | |
coverage: 'xdebug3' | |
php: '8.3' | |
phpunit: "^11" | |
- description: 'Xdebug 2' | |
coverage: 'xdebug2' | |
php: '8.1' | |
- description: 'PCov' | |
coverage: 'pcov' | |
php: '8.1' | |
- description: 'lowest' | |
coverage: 'xdebug2' | |
php: '8.1' | |
dependencies: 'lowest' | |
name: PHP ${{ matrix.php }} ${{ matrix.description }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
coverage: ${{ matrix.coverage }} | |
- run: composer remove --dev facile-it/facile-coding-standard vimeo/psalm psalm/plugin-phpunit psalm/plugin-symfony --no-update | |
if: matrix.dependencies == 'lowest' || matrix.phpunit | |
- run: composer require phpunit/phpunit ${{ matrix.phpunit }} --no-update | |
if: matrix.phpunit | |
- uses: ramsey/composer-install@v2 | |
with: | |
dependency-versions: ${{ matrix.dependencies }} | |
- run: vendor/bin/phpunit --coverage-clover=coverage.xml --colors=always | |
- uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: './coverage.xml' | |
fail_ci_if_error: true | |
Rector: | |
runs-on: ubuntu-latest | |
name: Rector | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.1' | |
- uses: ramsey/composer-install@v2 | |
with: | |
dependency-versions: highest | |
- run: vendor/bin/rector --ansi --dry-run | |
PHP-CS-Fixer: | |
runs-on: ubuntu-latest | |
name: Code style | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.1' | |
- uses: ramsey/composer-install@v2 | |
with: | |
dependency-versions: highest | |
- run: vendor/bin/php-cs-fixer fix --ansi --verbose --dry-run | |
PHPStan: | |
runs-on: ubuntu-latest | |
name: PHPStan | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.1' | |
- uses: ramsey/composer-install@v2 | |
with: | |
dependency-versions: highest | |
- run: vendor/bin/phpstan analyse --ansi | |
Psalm: | |
runs-on: ubuntu-latest | |
name: Psalm | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.1' | |
- uses: ramsey/composer-install@v2 | |
with: | |
dependency-versions: highest | |
- run: vendor/bin/psalm |