|
1 | 1 | name: Tests |
2 | 2 |
|
3 | | -on: [push, pull_request] |
| 3 | +on: |
| 4 | + - push |
| 5 | + - pull_request |
4 | 6 |
|
5 | 7 | jobs: |
6 | | - test: |
7 | | - name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} |
8 | | - runs-on: ubuntu-latest |
9 | | - strategy: |
10 | | - fail-fast: true |
11 | | - matrix: |
12 | | - php: [ 8.2, 8.1, 8.0 ] |
13 | | - laravel: [ 10.*, 9.*, 8.* ] |
14 | | - include: |
15 | | - - laravel: 10.* |
16 | | - testbench: 8.* |
17 | | - - laravel: 9.* |
18 | | - testbench: 7.* |
19 | | - - laravel: 8.* |
20 | | - testbench: 6.* |
21 | | - exclude: |
22 | | - - laravel: 10.* |
23 | | - php: 8.0 |
24 | | - - laravel: 10.* |
25 | | - php: 7.4 |
26 | | - - laravel: 9.* |
27 | | - php: 7.4 |
28 | | - |
29 | | - steps: |
30 | | - - name: Checkout code |
31 | | - uses: actions/checkout@v2 |
32 | | - |
33 | | - - name: Set correct PHP version |
34 | | - uses: shivammathur/setup-php@v2 |
35 | | - with: |
36 | | - php-version: ${{ matrix.php }} |
37 | | - coverage: pcov |
38 | | - |
39 | | - - name: Install dependencies |
40 | | - run: | |
41 | | - composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update |
42 | | - composer update --prefer-stable --prefer-dist --no-interaction --no-suggest |
43 | | -
|
44 | | - - name: Execute tests |
45 | | - run: vendor/bin/phpunit |
46 | | - |
47 | | - - name: Upload coverage to Scrutinizer |
48 | | - run: | |
49 | | - wget https://scrutinizer-ci.com/ocular.phar |
50 | | - php ocular.phar code-coverage:upload --format=php-clover coverage.clover |
| 8 | + test: |
| 9 | + name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} |
| 10 | + |
| 11 | + runs-on: ubuntu-latest |
| 12 | + |
| 13 | + strategy: |
| 14 | + fail-fast: true |
| 15 | + matrix: |
| 16 | + php: [8.2, 8.1, 8.0] |
| 17 | + laravel: ['8.*', '9.*', '10.*', '11.*'] |
| 18 | + include: |
| 19 | + - laravel: 10.* |
| 20 | + testbench: 8.* |
| 21 | + - laravel: 9.* |
| 22 | + testbench: 7.* |
| 23 | + - laravel: 8.* |
| 24 | + testbench: 6.* |
| 25 | + - laravel: 11.* |
| 26 | + testbench: 9.* |
| 27 | + exclude: |
| 28 | + - laravel: 10.* |
| 29 | + php: 8.0 |
| 30 | + - laravel: 10.* |
| 31 | + php: 7.4 |
| 32 | + - laravel: 9.* |
| 33 | + php: 7.4 |
| 34 | + - laravel: 11.* |
| 35 | + php: 8.1 |
| 36 | + - laravel: 11.* |
| 37 | + php: 8.0 |
| 38 | + |
| 39 | + steps: |
| 40 | + - name: Checkout code |
| 41 | + uses: actions/checkout@v2 |
| 42 | + |
| 43 | + - name: Set correct PHP version |
| 44 | + uses: shivammathur/setup-php@v2 |
| 45 | + with: |
| 46 | + php-version: ${{ matrix.php }} |
| 47 | + coverage: pcov |
| 48 | + |
| 49 | + - name: Install dependencies |
| 50 | + run: | |
| 51 | + composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update |
| 52 | + composer update --prefer-stable --prefer-dist --no-interaction --no-suggest |
| 53 | +
|
| 54 | + - name: Execute tests |
| 55 | + run: vendor/bin/phpunit |
| 56 | + |
| 57 | + - name: Upload coverage to Scrutinizer |
| 58 | + run: | |
| 59 | + wget https://scrutinizer-ci.com/ocular.phar |
| 60 | + php ocular.phar code-coverage:upload --format=php-clover coverage.clover |
0 commit comments