-
Notifications
You must be signed in to change notification settings - Fork 64
73 lines (57 loc) · 1.68 KB
/
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: tests
on:
# Run action on every push and PR
push:
pull_request:
# Run action at midnight to test against any updated dependencies
schedule:
- cron: '0 0 * * *'
jobs:
phpunit:
strategy:
matrix:
php: [ 8.1, 8.0, 7.4, 7.3, 7.2 ]
laravel: [ 9.x-dev, 8.*, 7.*, 6.* ]
os: [ ubuntu-latest, windows-latest ]
# Unsupported combinations
exclude:
- laravel: 9.x-dev
php: 7.4
- laravel: 9.x-dev
php: 7.3
- laravel: 9.x-dev
php: 7.2
- laravel: 8.*
php: 7.2
- laravel: 7.*
php: 8.1
- laravel: 7.*
php: 8.0
- laravel: 6.*
php: 8.1
- laravel: 6.*
php: 8.0
# Continue running through matrix even if one combination fails
fail-fast: false
runs-on: ${{ matrix.os }}
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.os }}
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: xdebug
extensions: fileinfo
- name: Install dependencies
run: |
# Install Laravel version per matrix
composer require --dev "laravel/framework:${{ matrix.laravel }}" --no-interaction
composer install --no-interaction
- name: Execute PHPUnit tests
run: vendor/bin/phpunit --coverage-clover build/logs/clover.xml
- name: Report coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: build/logs/clover.xml