|
1 | 1 | name: run-tests
|
2 | 2 |
|
3 |
| -on: [push, pull_request] |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ main ] |
| 6 | + pull_request: |
| 7 | + branches: [ main ] |
4 | 8 |
|
5 | 9 | jobs:
|
6 | 10 | test:
|
7 | 11 | runs-on: ${{ matrix.os }}
|
8 | 12 | strategy:
|
9 | 13 | fail-fast: true
|
| 14 | + max-parallel: 1 |
10 | 15 | matrix:
|
11 |
| - os: [ubuntu-latest] |
12 |
| - php: [7.2, 7.3, 7.4, 8.0] |
13 |
| - laravel: [6, 7, 8] |
14 |
| - dependency-version: [prefer-lowest, prefer-stable] |
| 16 | + os: [ ubuntu-latest, windows-latest ] |
| 17 | + php: [ 8.2, 8.3 ] |
| 18 | + laravel: [ 11.* ] |
| 19 | + stability: [ prefer-lowest, prefer-stable ] |
15 | 20 | include:
|
16 |
| - - laravel: 8 |
17 |
| - testbench: 6.* |
18 |
| - - laravel: 7 |
19 |
| - testbench: 5.* |
20 |
| - - laravel: 6 |
21 |
| - testbench: 4.* |
22 |
| - exclude: |
23 |
| - - laravel: 6 |
24 |
| - php: 8.0 |
25 |
| - - laravel: 7 |
26 |
| - php: 8.0 |
27 |
| - - laravel: 8 |
28 |
| - php: 7.2 |
29 |
| - - laravel: 8 |
30 |
| - php: 7.3 |
31 |
| - - laravel: 8 |
32 |
| - php: 8.0 |
33 |
| - dependency-version: prefer-lowest |
34 |
| - |
35 |
| - name: P${{ matrix.php }} - L${{ matrix.laravel }}.* - ${{ matrix.dependency-version }} - ${{ matrix.os }} |
| 21 | + - laravel: 11.* |
| 22 | + testbench: 9.* |
| 23 | + |
| 24 | + name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} |
36 | 25 |
|
37 | 26 | steps:
|
38 | 27 | - name: Checkout code
|
39 |
| - uses: actions/checkout@v2 |
40 |
| - |
41 |
| - - name: Cache dependencies |
42 |
| - uses: actions/cache@v2 |
43 |
| - with: |
44 |
| - path: ~/.composer/cache/files |
45 |
| - key: dependencies-laravel-${{ matrix.laravel }}.*-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} |
| 28 | + uses: actions/checkout@v3 |
46 | 29 |
|
47 | 30 | - name: Setup PHP
|
48 | 31 | uses: shivammathur/setup-php@v2
|
49 | 32 | with:
|
50 | 33 | php-version: ${{ matrix.php }}
|
51 |
| - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick |
52 |
| - coverage: pcov |
| 34 | + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo |
| 35 | + coverage: xdebug |
| 36 | + |
| 37 | + - name: Setup problem matchers |
| 38 | + run: | |
| 39 | + echo "::add-matcher::${{ runner.tool_cache }}/php.json" |
| 40 | + echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" |
53 | 41 |
|
54 | 42 | - name: Install dependencies
|
55 | 43 | run: |
|
56 |
| - composer require "laravel/framework:${{ matrix.laravel }}.*" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update |
57 |
| - composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest |
| 44 | + composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --dev --no-interaction --no-update |
| 45 | + composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-suggest |
| 46 | +
|
| 47 | + - name: Set phpunit.xml |
| 48 | + run: cp phpunit.xml.dist phpunit.xml |
58 | 49 |
|
59 | 50 | - name: Execute tests
|
60 | 51 | run: vendor/bin/phpunit
|
| 52 | + |
| 53 | + - name: Store test reports |
| 54 | + uses: actions/upload-artifact@v2 |
| 55 | + with: |
| 56 | + name: Store report |
| 57 | + retention-days: 1 |
| 58 | + path: | |
| 59 | + ./reports |
0 commit comments