|
1 | 1 | name: run-tests
|
2 | 2 |
|
3 |
| -on: [ push, pull_request ] |
| 3 | +on: |
| 4 | + - push |
| 5 | + - pull_request |
4 | 6 |
|
5 | 7 | jobs:
|
6 |
| - psalm: |
7 |
| - runs-on: ubuntu-latest |
8 |
| - steps: |
9 |
| - - uses: actions/checkout@v2 |
10 |
| - |
11 |
| - - name: Setup PHP |
12 |
| - uses: shivammathur/setup-php@v2 |
13 |
| - with: |
14 |
| - php-version: '8.0' |
15 |
| - coverage: none |
16 |
| - |
17 |
| - - name: Validate composer.json and composer.lock |
18 |
| - run: composer validate |
19 |
| - |
20 |
| - - name: Install dependencies |
21 |
| - run: composer install --no-progress --no-ansi |
22 |
| - |
23 |
| - - name: Run Psalm |
24 |
| - run: composer run-script psalm |
25 |
| - |
26 |
| - tests: |
27 |
| - runs-on: ubuntu-latest |
28 |
| - strategy: |
29 |
| - fail-fast: false |
30 |
| - matrix: |
31 |
| - php: [ 8.0, 8.1, 8.2, 8.3 ] |
32 |
| - laravel: [ 8.*, 9.*, 10.*, 11.* ] |
33 |
| - include: |
34 |
| - - laravel: 8.* |
35 |
| - testbench: 6.* |
36 |
| - - laravel: 9.* |
37 |
| - testbench: 7.* |
38 |
| - - laravel: 10.* |
39 |
| - testbench: 8.* |
40 |
| - - laravel: 11.* |
41 |
| - testbench: 9.* |
42 |
| - exclude: |
43 |
| - - php: 8.0 |
44 |
| - laravel: 10.* |
45 |
| - - php: 8.0 |
46 |
| - laravel: 11.* |
47 |
| - - php: 8.1 |
48 |
| - laravel: 11.* |
49 |
| - |
50 |
| - name: Laravel ${{ matrix.laravel }} with PHP ${{ matrix.php }} |
51 |
| - |
52 |
| - steps: |
53 |
| - - name: Checkout code |
54 |
| - uses: actions/checkout@v2 |
55 |
| - |
56 |
| - - name: Setup PHP |
57 |
| - uses: shivammathur/setup-php@v2 |
58 |
| - with: |
59 |
| - php-version: ${{ matrix.php }} |
60 |
| - coverage: none |
61 |
| - |
62 |
| - - name: Install dependencies |
63 |
| - run: | |
64 |
| - composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update |
65 |
| - composer require "orchestra/testbench:${{ matrix.testbench }}" --dev --no-interaction --no-update |
66 |
| - composer update --prefer-dist --no-interaction |
67 |
| -
|
68 |
| - - name: Execute tests |
69 |
| - run: composer run-script test |
70 |
| - |
71 |
| - |
72 |
| - coverage: |
73 |
| - name: Coverage |
74 |
| - needs: [ tests ] |
75 |
| - runs-on: ubuntu-latest |
76 |
| - steps: |
77 |
| - - uses: actions/checkout@v2 |
78 |
| - - name: Setup PHP |
79 |
| - uses: shivammathur/setup-php@v2 |
80 |
| - with: |
81 |
| - php-version: 8.0 |
82 |
| - coverage: xdebug |
83 |
| - |
84 |
| - - name: Validate composer.json and composer.lock |
85 |
| - run: composer validate |
86 |
| - |
87 |
| - - name: Install dependencies |
88 |
| - run: composer install --prefer-dist --no-interaction |
89 |
| - |
90 |
| - - name: Run test suite |
91 |
| - |
92 |
| - env: |
93 |
| - CC_TEST_REPORTER_ID: ${{ secrets.CC_REPORTER_ID }} |
94 |
| - with: |
95 |
| - coverageCommand: composer run-script test-coverage |
96 |
| - coverageLocations: ${{github.workspace}}/coverage.xml:clover |
| 8 | + psalm: |
| 9 | + runs-on: ubuntu-latest |
| 10 | + steps: |
| 11 | + - uses: actions/checkout@v4 |
| 12 | + |
| 13 | + - name: Setup PHP |
| 14 | + uses: shivammathur/setup-php@v2 |
| 15 | + with: |
| 16 | + php-version: '8.0' |
| 17 | + coverage: none |
| 18 | + |
| 19 | + - name: Validate composer.json and composer.lock |
| 20 | + run: composer validate |
| 21 | + |
| 22 | + - name: Install dependencies |
| 23 | + run: composer install --no-progress --no-ansi |
| 24 | + |
| 25 | + - name: Run Psalm |
| 26 | + run: composer run-script psalm |
| 27 | + |
| 28 | + tests: |
| 29 | + runs-on: ubuntu-latest |
| 30 | + strategy: |
| 31 | + fail-fast: false |
| 32 | + matrix: |
| 33 | + php: [8.0, 8.1, 8.2, 8.3, 8.4] |
| 34 | + laravel: ['8.*', '9.*', '10.*', '11.*', '12.*'] |
| 35 | + include: |
| 36 | + - laravel: 8.* |
| 37 | + testbench: 6.* |
| 38 | + - laravel: 9.* |
| 39 | + testbench: 7.* |
| 40 | + - laravel: 10.* |
| 41 | + testbench: 8.* |
| 42 | + - laravel: 11.* |
| 43 | + testbench: 9.* |
| 44 | + - laravel: 12.* |
| 45 | + testbench: 10.* |
| 46 | + exclude: |
| 47 | + - php: 8.0 |
| 48 | + laravel: 10.* |
| 49 | + - php: 8.0 |
| 50 | + laravel: 11.* |
| 51 | + - php: 8.0 |
| 52 | + laravel: 12.* |
| 53 | + - php: 8.1 |
| 54 | + laravel: 11.* |
| 55 | + - php: 8.1 |
| 56 | + laravel: 12.* |
| 57 | + - php: 8.4 |
| 58 | + laravel: 8.* |
| 59 | + |
| 60 | + |
| 61 | + name: Laravel ${{ matrix.laravel }} with PHP ${{ matrix.php }} |
| 62 | + steps: |
| 63 | + - name: Checkout code |
| 64 | + uses: actions/checkout@v4 |
| 65 | + |
| 66 | + - name: Setup PHP |
| 67 | + uses: shivammathur/setup-php@v2 |
| 68 | + with: |
| 69 | + php-version: ${{ matrix.php }} |
| 70 | + coverage: none |
| 71 | + |
| 72 | + - name: Install dependencies |
| 73 | + run: | |
| 74 | + composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update |
| 75 | + composer require "orchestra/testbench:${{ matrix.testbench }}" --dev --no-interaction --no-update |
| 76 | + composer update --prefer-dist --no-interaction |
| 77 | +
|
| 78 | + - name: Execute tests |
| 79 | + run: composer run-script test |
| 80 | + |
| 81 | + coverage: |
| 82 | + name: Coverage |
| 83 | + needs: |
| 84 | + - tests |
| 85 | + runs-on: ubuntu-latest |
| 86 | + steps: |
| 87 | + - uses: actions/checkout@v4 |
| 88 | + |
| 89 | + - name: Setup PHP |
| 90 | + uses: shivammathur/setup-php@v2 |
| 91 | + with: |
| 92 | + php-version: 8.0 |
| 93 | + coverage: xdebug |
| 94 | + |
| 95 | + - name: Validate composer.json and composer.lock |
| 96 | + run: composer validate |
| 97 | + |
| 98 | + - name: Install dependencies |
| 99 | + run: composer install --prefer-dist --no-interaction |
| 100 | + |
| 101 | + - name: Run test suite |
| 102 | + uses: paambaati/codeclimate-action@v9 |
| 103 | + env: |
| 104 | + CC_TEST_REPORTER_ID: ${{ secrets.CC_REPORTER_ID }} |
| 105 | + with: |
| 106 | + coverageCommand: composer run-script test-coverage |
| 107 | + coverageLocations: ${{github.workspace}}/coverage.xml:clover |
0 commit comments