|
1 |
| -name: Tests |
| 1 | +name: Cross-Platform Package Tests |
2 | 2 |
|
3 |
| -on: [push, pull_request] |
| 3 | +on: |
| 4 | + push: |
| 5 | + pull_request: |
4 | 6 |
|
5 | 7 | jobs:
|
6 | 8 | test:
|
7 | 9 | runs-on: ${{ matrix.os }}
|
8 | 10 | strategy:
|
9 |
| - fail-fast: true |
| 11 | + fail-fast: false |
10 | 12 | matrix:
|
11 | 13 | os: [ubuntu-latest, windows-latest]
|
12 |
| - php: [7.4, 8.0, 8.1, 8.2, 8.3] |
13 |
| - laravel: [8.*, 9.*, 10.*, 11.*] |
| 14 | + php: [7.4, 8.0, 8.1, 8.2, 8.3, 8.4] |
| 15 | + laravel: [8, 9, 10, 11] |
14 | 16 | stability: [prefer-lowest, prefer-stable]
|
15 |
| - include: |
16 |
| - # Laravel 8 requires PHP >=7.4 |
17 |
| - - php: 7.4 |
18 |
| - laravel: 8.* |
19 |
| - testbench: 6.* |
20 |
| - # Laravel 9 requires PHP >=8.0 |
21 |
| - - php: 8.0 |
22 |
| - laravel: 9.* |
23 |
| - testbench: 7.* |
24 |
| - # Laravel 10 requires PHP >=8.1 |
25 |
| - - php: 8.1 |
26 |
| - laravel: 10.* |
27 |
| - testbench: 8.* |
28 |
| - # Laravel 11 requires PHP >=8.2 |
29 |
| - - php: 8.2 |
30 |
| - laravel: 11.* |
31 |
| - testbench: 9.* |
32 |
| - |
33 |
| - name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} |
34 | 17 |
|
35 | 18 | steps:
|
36 |
| - - name: Checkout code |
37 |
| - uses: actions/checkout@v2 |
38 |
| - |
39 |
| - - name: Setup PHP |
| 19 | + - name: Check PHP/Laravel compatibility |
| 20 | + if: | |
| 21 | + (matrix.laravel == 8 && matrix.php not in ['7.4', '8.0', '8.1']) || |
| 22 | + (matrix.laravel == 9 && matrix.php not in ['8.0', '8.1', '8.2']) || |
| 23 | + (matrix.laravel == 10 && matrix.php not in ['8.1', '8.2', '8.3']) || |
| 24 | + (matrix.laravel == 11 && matrix.php not in ['8.2', '8.3', '8.4']) |
| 25 | + run: exit 0 # Skip incompatible versions |
| 26 | + |
| 27 | + - name: Set up PHP |
40 | 28 | uses: shivammathur/setup-php@v2
|
41 | 29 | with:
|
42 | 30 | php-version: ${{ matrix.php }}
|
43 |
| - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo |
| 31 | + extensions: mbstring, json, xml |
44 | 32 | coverage: none
|
45 | 33 |
|
46 |
| - - name: Setup problem matchers |
47 |
| - run: | |
48 |
| - echo "::add-matcher::${{ runner.tool_cache }}/php.json" |
49 |
| - echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" |
| 34 | + - name: Check out code |
| 35 | + uses: actions/checkout@v4 |
50 | 36 |
|
51 | 37 | - name: Install dependencies
|
52 | 38 | run: |
|
53 |
| - composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update |
| 39 | + composer require --no-update laravel/framework:${{ matrix.laravel }}.* |
| 40 | + composer require --no-update orchestra/testbench:${{ matrix.laravel - 2 }}.* |
54 | 41 | composer update --${{ matrix.stability }} --prefer-dist --no-interaction
|
55 | 42 |
|
56 |
| - - name: Execute tests |
| 43 | + - name: Run tests with Pest |
57 | 44 | run: vendor/bin/pest
|
0 commit comments