|
1 | | -name: Run Tests |
2 | | -on: [push, pull_request] |
| 1 | +name: run-tests |
| 2 | + |
| 3 | +on: |
| 4 | + - push |
| 5 | + - pull_request |
3 | 6 |
|
4 | 7 | jobs: |
5 | | - run: |
6 | | - runs-on: ubuntu-latest |
| 8 | + test: |
| 9 | + runs-on: ${{ matrix.os }} |
| 10 | + |
7 | 11 | strategy: |
8 | | - max-parallel: 15 |
9 | 12 | fail-fast: false |
10 | 13 | matrix: |
11 | | - php-versions: ["7.3", "7.4", "8.0"] |
12 | | - composer-flags: ["--prefer-lowest", "--prefer-stable"] |
13 | | - env: |
14 | | - - LARAVEL_VERSION='^7.0' |
15 | | - - LARAVEL_VERSION='^8.0' |
16 | | - name: Test on PHP ${{ matrix.php-versions }}, Laravel ${{ matrix.laravel-versions }} and ${{ matrix.composer-flags }} |
| 14 | + os: [ubuntu-latest] |
| 15 | + php: [8.4, 8.3, 8.2] |
| 16 | + laravel: [^12.0, ^11.0] |
| 17 | + dependency-version: [prefer-lowest, prefer-stable] |
| 18 | + include: |
| 19 | + - laravel: ^11.0 |
| 20 | + testbench: ^9.0 |
| 21 | + - laravel: ^12.0 |
| 22 | + testbench: ^10.0 |
| 23 | + |
| 24 | + name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }} |
| 25 | + |
17 | 26 | steps: |
18 | | - - name: Checkout |
19 | | - uses: actions/checkout@master |
20 | | - - name: Install PHP |
21 | | - uses: shivammathur/setup-php@master |
| 27 | + - name: Checkout code |
| 28 | + uses: actions/checkout@v4 |
| 29 | + |
| 30 | + - name: Setup PHP |
| 31 | + uses: shivammathur/setup-php@v2 |
22 | 32 | with: |
23 | | - php-version: ${{ matrix.php-versions }} |
24 | | - - name: Install Dependencies |
| 33 | + php-version: ${{ matrix.php }} |
| 34 | + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick |
| 35 | + coverage: none |
| 36 | + |
| 37 | + - name: Install dependencies |
25 | 38 | run: | |
26 | | - ${{ matrix.env }} |
27 | | - composer config discard-changes true |
28 | | - composer self-update |
29 | | - composer require --dev "laravel/framework:${LARAVEL_VERSION}" --no-interaction --no-update |
30 | | - composer update ${{ matrix.composer-flags }} --prefer-dist --no-suggest --no-interaction |
31 | | - - name: Run PHPUnit |
32 | | - run: php vendor/bin/phpunit |
| 39 | + composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update |
| 40 | + composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction |
| 41 | +
|
| 42 | + - name: Execute tests |
| 43 | + run: vendor/bin/phpunit |
0 commit comments