1
+ name : test
2
+
3
+ on :
4
+ push :
5
+ pull_request :
6
+
7
+ jobs :
8
+ tests :
9
+ runs-on : ubuntu-latest
10
+
11
+ strategy :
12
+ fail-fast : true
13
+ matrix :
14
+ php : [ '7.2', '7.3', '7.4', '8.0', '8.1' ]
15
+ laravel : [ '5.5', '5.6', '5.7', '5.8', '6', '7', '8' ]
16
+ exclude :
17
+ - php : ' 7.2'
18
+ laravel : ' 8'
19
+ - php : ' 8.0'
20
+ laravel : ' 5.5'
21
+ - php : ' 8.0'
22
+ laravel : ' 5.6'
23
+ - php : ' 8.0'
24
+ laravel : ' 5.7'
25
+ - php : ' 8.0'
26
+ laravel : ' 5.8'
27
+ - php : ' 8.1'
28
+ laravel : ' 5.5'
29
+ - php : ' 8.1'
30
+ laravel : ' 5.6'
31
+ - php : ' 8.1'
32
+ laravel : ' 5.7'
33
+ - php : ' 8.1'
34
+ laravel : ' 5.8'
35
+ - php : ' 8.1'
36
+ laravel : ' 6'
37
+ - php : ' 8.1'
38
+ laravel : ' 7'
39
+
40
+ name : PHP ${{ matrix.php }}; Laravel ${{ matrix.laravel }}
41
+
42
+ steps :
43
+ - name : Checkout code
44
+ uses : actions/checkout@v2
45
+
46
+ - name : Setup PHP
47
+ uses : shivammathur/setup-php@v2
48
+ with :
49
+ php-version : ${{ matrix.php }}
50
+ tools : composer:v2
51
+ coverage : xdebug
52
+
53
+ - name : Setup Problem Matchers
54
+ run : echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
55
+
56
+ - name : Select Laravel 5.5
57
+ uses : nick-invision/retry@v1
58
+ with :
59
+ timeout_minutes : 5
60
+ max_attempts : 5
61
+ command : composer require "laravel/framework:5.5.*" "phpunit/phpunit:^6.5.14" --no-update --no-interaction
62
+ if : " matrix.laravel == '5.5'"
63
+
64
+ - name : Select Laravel 5.6
65
+ uses : nick-invision/retry@v1
66
+ with :
67
+ timeout_minutes : 5
68
+ max_attempts : 5
69
+ command : composer require "laravel/framework:5.6.*" "phpunit/phpunit:^7.5.20" --no-update --no-interaction
70
+ if : " matrix.laravel == '5.6'"
71
+
72
+ - name : Select Laravel 5.7
73
+ uses : nick-invision/retry@v1
74
+ with :
75
+ timeout_minutes : 5
76
+ max_attempts : 5
77
+ command : composer require "laravel/framework:5.7.*" "phpunit/phpunit:^7.5.20" --no-update --no-interaction
78
+ if : " matrix.laravel == '5.7'"
79
+
80
+ - name : Select Laravel 5.8
81
+ uses : nick-invision/retry@v1
82
+ with :
83
+ timeout_minutes : 5
84
+ max_attempts : 5
85
+ command : composer require "laravel/framework:5.8.*" "phpunit/phpunit:^7.5.20|^8.5.8" --no-update --no-interaction
86
+ if : " matrix.laravel == '5.8'"
87
+
88
+ - name : Select Laravel 6
89
+ uses : nick-invision/retry@v1
90
+ with :
91
+ timeout_minutes : 5
92
+ max_attempts : 5
93
+ command : composer require "laravel/framework:6.*" "phpunit/phpunit:^8.5.8|^9.3.7" --no-update --no-interaction
94
+ if : " matrix.laravel == '6'"
95
+
96
+ - name : Select Laravel 7
97
+ uses : nick-invision/retry@v1
98
+ with :
99
+ timeout_minutes : 5
100
+ max_attempts : 5
101
+ command : composer require "laravel/framework:7.*" "phpunit/phpunit:^8.5.8|^9.3.7" --no-update --no-interaction
102
+ if : " matrix.laravel == '7'"
103
+
104
+ - name : Select Laravel 8
105
+ uses : nick-invision/retry@v1
106
+ with :
107
+ timeout_minutes : 5
108
+ max_attempts : 5
109
+ command : composer require "laravel/framework:8.*" "phpunit/phpunit:^9.3.7" --no-update --no-interaction
110
+ if : " matrix.laravel == '8'"
111
+
112
+ - name : Install PHP Dependencies
113
+ uses : nick-invision/retry@v1
114
+ with :
115
+ timeout_minutes : 5
116
+ max_attempts : 5
117
+ command : composer update --no-interaction --no-progress
118
+
119
+ - name : Execute tests
120
+ run : ./vendor/bin/phpunit --coverage-clover clover.xml
121
+
122
+ - name : Execute code style checks
123
+ run : ./vendor/bin/phpcs --standard=PSR2 -p --ignore=./tests/storage/* --report=full --report-checkstyle=build/logs/checkstyle.xml src/ tests/
124
+
125
+ - name : Check code coverage
126
+ if : ${{ matrix.php == '8.1' }}
127
+ uses : codecov/codecov-action@v2.1.0
0 commit comments