-
-
Notifications
You must be signed in to change notification settings - Fork 9
54 lines (52 loc) · 1.8 KB
/
unit-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
52
53
54
name: Unit Tests
on: [push, pull_request]
jobs:
run:
runs-on: ubuntu-latest
strategy:
max-parallel: 10
matrix:
laravel-version: ['^6.0', '^7.0', '^8.0', '^9.0', '^10.0']
preference: ['stable']
php-version: ['7.4', '8.0', '8.1', '8.2']
exclude:
- laravel-version: ^6.0
php-version: 8.1
- laravel-version: ^7.0
php-version: 8.1
- laravel-version: ^6.0
php-version: 8.2
- laravel-version: ^7.0
php-version: 8.2
- laravel-version: ^9.0
php-version: 7.4
- laravel-version: ^10.0
php-version: 7.4
- laravel-version: ^10.0
php-version: 8.0
name: Laravel ${{ matrix.laravel-version }} (${{ matrix.preference }}) on PHP ${{ matrix.php-version }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, xdebug
coverage: xdebug
- name: Install dependencies
run: |
composer require --no-update --no-interaction "illuminate/support:${{ matrix.laravel-version }}"
composer update --prefer-${{ matrix.preference }} --no-interaction --prefer-dist --no-suggest --no-scripts --optimize-autoloader
- name: Lint composer.json
run: composer validate
- name: Run Tests
run: composer test:ci
- name: Upload Coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }} #required
file: ./coverage.xml #optional
flags: unittests #optional
name: codecov-umbrella #optional
fail_ci_if_error: true #optional (default = false)