Tests #3910
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: [4.x] | |
| pull_request: | |
| schedule: | |
| - cron: '0 9 * * *' | |
| concurrency: | |
| group: tests-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| tests: | |
| if: github.event_name != 'schedule' || github.repository == 'pestphp/pest' | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 15 | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] # windows-latest | |
| symfony: ['7.4', '8.0'] | |
| php: ['8.3', '8.4', '8.5'] | |
| dependency_version: [prefer-stable] | |
| exclude: | |
| - php: '8.3' | |
| symfony: '8.0' | |
| name: PHP ${{ matrix.php }} - Symfony ^${{ matrix.symfony }} - ${{ matrix.os }} - ${{ matrix.dependency_version }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| tools: composer:v2 | |
| coverage: none | |
| extensions: sockets | |
| - name: Get Composer cache directory | |
| id: composer-cache | |
| shell: bash | |
| run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
| - name: Cache Composer dependencies | |
| uses: actions/cache@v5 | |
| with: | |
| path: ${{ steps.composer-cache.outputs.dir }} | |
| key: ${{ matrix.os }}-php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-composer-${{ hashFiles('**/composer.json') }} | |
| restore-keys: | | |
| ${{ matrix.os }}-php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-composer- | |
| ${{ matrix.os }}-php-${{ matrix.php }}-composer- | |
| - name: Setup Problem Matches | |
| run: | | |
| echo "::add-matcher::${{ runner.tool_cache }}/php.json" | |
| echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
| - name: Install PHP dependencies | |
| shell: bash | |
| run: composer update --${{ matrix.dependency_version }} --no-interaction --no-progress --ansi --with="symfony/console:^${{ matrix.symfony }}" | |
| - name: Unit Tests | |
| run: composer test:unit | |
| - name: Parallel Tests | |
| run: composer test:parallel | |
| - name: Integration Tests | |
| run: composer test:integration |