|
1 | | -name: Run Tests |
| 1 | +name: tests |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | push: |
5 | | - branches: [ master ] |
6 | 5 | pull_request: |
7 | | - branches: [ master ] |
8 | 6 |
|
9 | 7 | jobs: |
10 | | - laravel-tests: |
| 8 | + tests: |
| 9 | + |
11 | 10 | runs-on: ubuntu-latest |
12 | 11 | strategy: |
13 | | - fail-fast: false |
| 12 | + fail-fast: true |
14 | 13 | matrix: |
15 | | - php-versions: ['7.1', '7.2', '7.3', '7.4'] |
| 14 | + php: [7.1, 7.2, 7.3, 7.4] |
| 15 | + laravel: [5.8.*, ^6.0, ^7.0] |
| 16 | + exclude: |
| 17 | + - php: 7.1 |
| 18 | + laravel: ^6.0 |
| 19 | + - php: 7.1 |
| 20 | + laravel: ^7.0 |
| 21 | + |
| 22 | + name: P${{ matrix.php }} - L${{ matrix.laravel }} |
| 23 | + |
16 | 24 | steps: |
17 | | - - uses: actions/checkout@v2 |
18 | | - - name: Setup PHP with extensions |
19 | | - uses: shivammathur/setup-php@v1 |
20 | | - with: |
21 | | - php-version: ${{ matrix.php-versions }} |
22 | | - - name: Install Dependencies |
23 | | - run: composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist |
24 | | - - name: Execute tests |
25 | | - run: composer run-script test |
| 25 | + - name: Checkout code |
| 26 | + uses: actions/checkout@v2 |
| 27 | + |
| 28 | + - name: Cache dependencies |
| 29 | + uses: actions/cache@v1 |
| 30 | + with: |
| 31 | + path: ~/.composer/cache/files |
| 32 | + key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} |
| 33 | + |
| 34 | + - name: Setup PHP |
| 35 | + uses: shivammathur/setup-php@v2 |
| 36 | + with: |
| 37 | + php-version: ${{ matrix.php }} |
| 38 | + extensions: dom, curl, libxml, mbstring, zip |
| 39 | + coverage: none |
| 40 | + |
| 41 | + - name: Install dependencies |
| 42 | + run: composer require "illuminate/contracts=${{ matrix.laravel }}" --prefer-dist --no-interaction --no-suggest |
| 43 | + |
| 44 | + - name: Execute tests |
| 45 | + run: composer run-script test |
0 commit comments