Modernize for PHP 8.4+, Symfony 6.4/7.4/8.1+, PHPUnit 12 #151
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: Tests | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| jobs: | |
| check-cs: | |
| name: Check Coding Standards | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.4' | |
| - name: Setup Castor | |
| uses: castor-php/setup-castor@2a495b8c91f00be6768ad8a040ba8634c797d386 # v1.1.0 | |
| - name: Run CS check | |
| run: castor cs --dry-run | |
| phpstan: | |
| name: Static Analysis | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.4' | |
| - name: Setup Castor | |
| uses: castor-php/setup-castor@2a495b8c91f00be6768ad8a040ba8634c797d386 # v1.1.0 | |
| - name: Install dependencies | |
| run: castor install | |
| - name: Run PHPStan | |
| run: castor phpstan | |
| tests: | |
| name: Test PHP ${{ matrix.php }} ${{ matrix.name }} | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: ['8.4', '8.5'] | |
| composer-flags: [''] | |
| name: [''] | |
| include: | |
| - php: '8.4' | |
| composer-flags: '--prefer-lowest' | |
| name: '(prefer lowest dependencies)' | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| - name: Setup Problem Matchers | |
| run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
| - name: Validate composer.json | |
| run: composer validate --strict | |
| - name: Install Composer dependencies | |
| run: | | |
| composer update --prefer-dist --no-interaction ${{ matrix.composer-flags }} | |
| - name: Execute PHPUnit | |
| run: vendor/bin/phpunit |