@@ -119,8 +119,6 @@ jobs:
119
119
- name : Execute Rector
120
120
run : vendor/bin/rector --dry-run
121
121
122
- - name : Execute PHP Insights
123
- run : vendor/bin/phpinsights --no-interaction
124
122
125
123
laravel11-tests :
126
124
runs-on : ubuntu-latest
@@ -222,6 +220,103 @@ jobs:
222
220
- name : Execute Rector
223
221
run : vendor/bin/rector --dry-run
224
222
225
- - name : Execute PHP Insights
226
- run : vendor/bin/phpinsights --no-interaction
227
223
224
+ laravel12-tests :
225
+ runs-on : ubuntu-latest
226
+
227
+ strategy :
228
+ matrix :
229
+ operating-system : [ ubuntu-latest ]
230
+ php : [ '8.2', '8.3', '8.4' ]
231
+ dependency-stability : [ 'prefer-stable' ]
232
+
233
+ laravel : [ '12.*' ]
234
+ include :
235
+ - laravel : 12.*
236
+ testbench : 10.*
237
+
238
+ name : PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.dependency-stability }} - ${{ matrix.operating-system}}
239
+
240
+ steps :
241
+ - name : Checkout code
242
+ uses : actions/checkout@v4
243
+
244
+ - name : Setup Node.js
245
+ uses : actions/setup-node@v4
246
+ with :
247
+ node-version : ' 20.x'
248
+
249
+ - name : Cache node_modules directory
250
+ uses : actions/cache@v4
251
+ id : node_modules-cache
252
+ with :
253
+ path : node_modules
254
+ key : ${{ runner.os }}-build-${{ hashFiles('**/package.json') }}-${{ hashFiles('**/package-lock.json') }}
255
+
256
+ - name : Install NPM packages
257
+ if : steps.node_modules-cache.outputs.cache-hit != 'true'
258
+ run : npm ci --include=dev
259
+
260
+ - name : Install PHP versions
261
+ uses : shivammathur/setup-php@v2
262
+ with :
263
+ php-version : ${{ matrix.php }}
264
+
265
+ - name : Get Composer Cache Directory
266
+ id : composer-cache
267
+ run : |
268
+ echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
269
+
270
+ - name : Cache Composer dependencies
271
+ uses : actions/cache@v4
272
+ id : actions-cache
273
+ with :
274
+ path : ${{ steps.composer-cache.outputs.dir }}
275
+ key : ${{ runner.os }}-composer-laravel-11-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
276
+ restore-keys : |
277
+ ${{ runner.os }}-composer-laravel-11-${{ matrix.php }}-
278
+
279
+ - name : Cache PHP dependencies (vendor)
280
+ uses : actions/cache@v4
281
+ id : vendor-cache
282
+ with :
283
+ path : vendor
284
+ key : ${{ runner.os }}-build-laravel-11-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
285
+
286
+ - name : Install Laravel Dependencies
287
+ if : steps.vendor-cache.outputs.cache-hit != 'true'
288
+ run : |
289
+ composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
290
+ composer update --${{ matrix.dependency-stability }} --prefer-dist --no-interaction --no-suggest
291
+
292
+ - name : Update Dependencies with latest stable
293
+ if : matrix.dependency-stability == 'prefer-stable'
294
+ run : composer update --prefer-stable
295
+
296
+ - name : Update Dependencies with lowest stable
297
+ if : matrix.dependency-stability == 'prefer-lowest'
298
+ run : composer update --prefer-stable --prefer-lowest
299
+
300
+ - name : Set up Git User
301
+ run : |
302
+ git config --global user.email "[email protected] "
303
+ git config --global user.name "GitHub Actions"
304
+
305
+ # Code quality
306
+ - name : Execute tests (Unit and Feature tests) via PestPHP
307
+ shell : ' script -q -e -c "bash {0}"'
308
+ # Set environment
309
+ env :
310
+ SESSION_DRIVER : array
311
+ TTY : true
312
+
313
+ run : vendor/bin/pest
314
+
315
+ - name : Execute Code Sniffer via Laravel Pint
316
+ run : vendor/bin/pint --test src config
317
+
318
+ - name : Execute PHP Stan
319
+ run : vendor/bin/phpstan
320
+
321
+ - name : Execute Rector
322
+ run : vendor/bin/rector --dry-run
0 commit comments