12
12
- master
13
13
- main
14
14
- develop
15
+ schedule :
16
+ - cron : " 0 6 * * *"
17
+
18
+ permissions :
19
+ contents : read
15
20
16
21
jobs :
17
- laravel9 -tests :
22
+ laravel11 -tests :
18
23
runs-on : ubuntu-latest
19
24
20
25
strategy :
26
+ fail-fast : false
21
27
matrix :
22
28
operating-system : [ ubuntu-latest ]
23
- php : [ '8.1 ', '8.2 ' ]
29
+ php : [ '8.2 ', '8.3', '8.4 ' ]
24
30
dependency-stability : [ 'prefer-stable' ]
25
31
26
- laravel : [ '9 .*' ]
32
+ laravel : [ '11 .*' ]
27
33
include :
28
- - laravel : 9 .*
29
- testbench : 8 .*
34
+ - laravel : 11 .*
35
+ testbench : 9 .*
30
36
31
37
name : PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.dependency-stability }} - ${{ matrix.operating-system}}
32
38
44
50
id : node_modules-cache
45
51
with :
46
52
path : node_modules
47
- key : ${{ runner.OS }}-build-${{ hashFiles('**/package.json') }}-${{ hashFiles('**/package-lock.json') }}
53
+ key : ${{ runner.os }}-build-${{ hashFiles('**/package.json') }}-${{ hashFiles('**/package-lock.json') }}
48
54
49
55
- name : Install NPM packages
50
56
if : steps.node_modules-cache.outputs.cache-hit != 'true'
@@ -65,22 +71,22 @@ jobs:
65
71
id : actions-cache
66
72
with :
67
73
path : ${{ steps.composer-cache.outputs.dir }}
68
- key : ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
74
+ key : ${{ runner.os }}-composer-laravel-11-${{ matrix.php }}- ${{ hashFiles('**/composer.lock') }}
69
75
restore-keys : |
70
- ${{ runner.os }}-composer-
76
+ ${{ runner.os }}-composer-laravel-11-${{ matrix.php }}-
71
77
72
78
- name : Cache PHP dependencies (vendor)
73
79
uses : actions/cache@v4
74
80
id : vendor-cache
75
81
with :
76
82
path : vendor
77
- key : ${{ runner.OS }}-build-${{ hashFiles('**/composer.lock') }}
83
+ key : ${{ runner.os }}-build-laravel-11-${{ matrix.php }} -${{ hashFiles('**/composer.lock') }}
78
84
79
85
- name : Install Laravel Dependencies
80
86
if : steps.vendor-cache.outputs.cache-hit != 'true'
81
87
run : |
82
88
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
83
- composer update --${{ matrix.dependency-stability }} --prefer-dist --no-interaction --no-suggest
89
+ composer update --${{ matrix.dependency-stability }} --prefer-dist --no-interaction
84
90
85
91
- name : Update Dependencies with latest stable
86
92
if : matrix.dependency-stability == 'prefer-stable'
@@ -108,113 +114,29 @@ jobs:
108
114
- name : Execute Code Sniffer via Laravel Pint
109
115
run : vendor/bin/pint --test src config
110
116
111
- laravel10-tests :
112
- runs-on : ubuntu-latest
113
-
114
- strategy :
115
- matrix :
116
- operating-system : [ ubuntu-latest ]
117
- php : [ '8.1', '8.2' ]
118
- dependency-stability : [ 'prefer-stable' ]
119
-
120
- laravel : [ '10.*' ]
121
- include :
122
- - laravel : 10.*
123
- testbench : 8.*
124
-
125
- name : PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.dependency-stability }} - ${{ matrix.operating-system}}
126
-
127
- steps :
128
- - name : Checkout code
129
- uses : actions/checkout@v4
130
-
131
- - name : Setup Node.js
132
- uses : actions/setup-node@v4
133
- with :
134
- node-version : ' 20.x'
135
-
136
- - name : Cache node_modules directory
137
- uses : actions/cache@v4
138
- id : node_modules-cache
139
- with :
140
- path : node_modules
141
- key : ${{ runner.OS }}-build-${{ hashFiles('**/package.json') }}-${{ hashFiles('**/package-lock.json') }}
142
-
143
- - name : Install NPM packages
144
- if : steps.node_modules-cache.outputs.cache-hit != 'true'
145
- run : npm ci --include=dev
146
-
147
- - name : Install PHP versions
148
- uses : shivammathur/setup-php@v2
149
- with :
150
- php-version : ${{ matrix.php }}
151
-
152
- - name : Get Composer Cache Directory
153
- id : composer-cache
154
- run : |
155
- echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
156
-
157
- - name : Cache Composer dependencies
158
- uses : actions/cache@v4
159
- id : actions-cache
160
- with :
161
- path : ${{ steps.composer-cache.outputs.dir }}
162
- key : ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
163
- restore-keys : |
164
- ${{ runner.os }}-composer-
165
-
166
- - name : Cache PHP dependencies (vendor)
167
- uses : actions/cache@v4
168
- id : vendor-cache
169
- with :
170
- path : vendor
171
- key : ${{ runner.OS }}-build-${{ hashFiles('**/composer.lock') }}
172
-
173
- - name : Install Laravel Dependencies
174
- if : steps.vendor-cache.outputs.cache-hit != 'true'
175
- run : |
176
- composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
177
- composer update --${{ matrix.dependency-stability }} --prefer-dist --no-interaction --no-suggest
178
-
179
- - name : Update Dependencies with latest stable
180
- if : matrix.dependency-stability == 'prefer-stable'
181
- run : composer update --prefer-stable
182
-
183
- - name : Update Dependencies with lowest stable
184
- if : matrix.dependency-stability == 'prefer-lowest'
185
- run : composer update --prefer-stable --prefer-lowest
186
-
187
- - name : Set up Git User
188
- run : |
189
- git config --global user.email "[email protected] "
190
- git config --global user.name "GitHub Actions"
117
+ - name : Execute PHP Stan
118
+ run : vendor/bin/phpstan
191
119
192
- # Code quality
193
- - name : Execute tests (Unit and Feature tests) via PestPHP
194
- shell : ' script -q -e -c "bash {0}"'
195
- # Set environment
196
- env :
197
- SESSION_DRIVER : array
198
- TTY : true
199
-
200
- run : vendor/bin/pest
120
+ - name : Execute Rector
121
+ run : vendor/bin/rector --dry-run
201
122
202
- - name : Execute Code Sniffer via Laravel Pint
203
- run : vendor/bin/pint --test src config
123
+ - name : Execute PHP Insights
124
+ run : vendor/bin/phpinsights --disable-security-check --no-interaction
204
125
205
- laravel11 -tests :
126
+ laravel12 -tests :
206
127
runs-on : ubuntu-latest
207
128
208
129
strategy :
130
+ fail-fast : false
209
131
matrix :
210
132
operating-system : [ ubuntu-latest ]
211
- php : [ '8.2', '8.3' ]
133
+ php : [ '8.2', '8.3', '8.4' ]
212
134
dependency-stability : [ 'prefer-stable' ]
213
135
214
- laravel : [ '11 .*' ]
136
+ laravel : [ '12 .*' ]
215
137
include :
216
- - laravel : 11 .*
217
- testbench : 9 .*
138
+ - laravel : 12 .*
139
+ testbench : 10 .*
218
140
219
141
name : PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.dependency-stability }} - ${{ matrix.operating-system}}
220
142
@@ -232,7 +154,7 @@ jobs:
232
154
id : node_modules-cache
233
155
with :
234
156
path : node_modules
235
- key : ${{ runner.OS }}-build-${{ hashFiles('**/package.json') }}-${{ hashFiles('**/package-lock.json') }}
157
+ key : ${{ runner.os }}-build-${{ hashFiles('**/package.json') }}-${{ hashFiles('**/package-lock.json') }}
236
158
237
159
- name : Install NPM packages
238
160
if : steps.node_modules-cache.outputs.cache-hit != 'true'
@@ -253,22 +175,22 @@ jobs:
253
175
id : actions-cache
254
176
with :
255
177
path : ${{ steps.composer-cache.outputs.dir }}
256
- key : ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
178
+ key : ${{ runner.os }}-composer-laravel-12-${{ matrix.php }}- ${{ hashFiles('**/composer.lock') }}
257
179
restore-keys : |
258
- ${{ runner.os }}-composer-
180
+ ${{ runner.os }}-composer-laravel-12-${{ matrix.php }}-
259
181
260
182
- name : Cache PHP dependencies (vendor)
261
183
uses : actions/cache@v4
262
184
id : vendor-cache
263
185
with :
264
186
path : vendor
265
- key : ${{ runner.OS }}-build-${{ hashFiles('**/composer.lock') }}
187
+ key : ${{ runner.os }}-build-laravel-12-${{ matrix.php }} -${{ hashFiles('**/composer.lock') }}
266
188
267
189
- name : Install Laravel Dependencies
268
190
if : steps.vendor-cache.outputs.cache-hit != 'true'
269
191
run : |
270
192
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
271
- composer update --${{ matrix.dependency-stability }} --prefer-dist --no-interaction --no-suggest
193
+ composer update --${{ matrix.dependency-stability }} --prefer-dist --no-interaction
272
194
273
195
- name : Update Dependencies with latest stable
274
196
if : matrix.dependency-stability == 'prefer-stable'
@@ -296,3 +218,11 @@ jobs:
296
218
- name : Execute Code Sniffer via Laravel Pint
297
219
run : vendor/bin/pint --test src config
298
220
221
+ - name : Execute PHP Stan
222
+ run : vendor/bin/phpstan
223
+
224
+ - name : Execute Rector
225
+ run : vendor/bin/rector --dry-run
226
+
227
+ - name : Execute PHP Insights
228
+ run : vendor/bin/phpinsights --disable-security-check --no-interaction
0 commit comments