Add matrix strategy to test job #87
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: test | |
| on: | |
| pull_request: | |
| branches: | |
| - 'main' | |
| - 'development' | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: [8.2, 8.3, 8.4, 8.5] | |
| laravel: [10.*, 11.*, 12.*] | |
| include: | |
| - laravel: 10.* | |
| testbench: ^8.0 | |
| phpunit: ^10.0 | |
| - laravel: 11.* | |
| testbench: ^9.0 | |
| phpunit: ^10.5 | |
| - laravel: 12.* | |
| testbench: ^10.0 | |
| phpunit: ^11.0 | |
| exclude: | |
| # Laravel 10 doesn't support PHP 8.4 | |
| - php: 8.4 | |
| laravel: 10.* | |
| # Only Laravel 12 supports PHP 8.5 | |
| - php: 8.5 | |
| laravel: 10.* | |
| - php: 8.5 | |
| laravel: 11.* | |
| name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv | |
| coverage: none | |
| - name: Install dependencies | |
| run: | | |
| composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update | |
| composer require "orchestra/testbench:${{ matrix.testbench }}" "phpunit/phpunit:${{ matrix.phpunit }}" --dev --no-interaction --no-update | |
| composer update --prefer-dist --no-interaction --no-progress | |
| - name: Execute tests | |
| run: vendor/bin/phpunit | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v1 | |
| - name: "laravel-pint" | |
| uses: aglipanci/laravel-pint-action@2.0.0 | |
| with: | |
| preset: laravel | |
| verboseMode: true | |
| testMode: true | |
| onlyDirty: true |