-
-
Notifications
You must be signed in to change notification settings - Fork 3
51 lines (43 loc) · 1.54 KB
/
run-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: 'Run Tests'
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.can-fail }}
strategy:
fail-fast: true
matrix:
php: ['8.1', '8.2', '8.3']
laravel: ['10.*', '11.*']
composer-flags: ['--prefer-stable']
can-fail: [false]
include:
- php: '8.1'
laravel: '10.*'
composer-flags: '--prefer-stable --prefer-lowest'
can-fail: false
exclude:
- php: '8.1'
laravel: '11.*'
name: "PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }}${{ matrix.composer-flags != '' && format(' - Composer {0}', matrix.composer-flags) || '' }}"
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.composer/cache/files
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}-flags-${{ matrix.composer-flags }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
extensions: curl, iconv, mbstring, pdo, pdo_sqlite, sqlite, zip
coverage: none
- name: Install dependencies
run: |
composer require --no-update laravel/framework:${{ matrix.laravel }}
composer update ${{ matrix.composer-flags }} --prefer-dist --no-suggest
- name: Execute tests
run: vendor/bin/phpunit