Skip to content

Commit 2f93e60

Browse files
authored
Laravel 12 Support (#43)
1 parent f3245a0 commit 2f93e60

File tree

2 files changed

+31
-21
lines changed

2 files changed

+31
-21
lines changed

.github/workflows/run-tests.yml

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,52 @@ name: run-tests
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches:
6+
- master
7+
- develop
68
pull_request:
7-
branches: [ main ]
9+
schedule:
10+
- cron: '0 0 * * *'
811

912
jobs:
1013
test:
11-
runs-on: ${{ matrix.os }}
14+
runs-on: ubuntu-latest
15+
1216
strategy:
1317
fail-fast: true
1418
matrix:
15-
os: [ ubuntu-latest ]
16-
php: [ 8.2 ]
17-
laravel: [ 10.*,11.* ]
18-
19-
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
19+
php: [8.4, 8.3, 8.2]
20+
laravel: ['10.*', '11.*', '12.*']
21+
stability: [prefer-lowest, prefer-stable]
22+
include:
23+
- laravel: 11.*
24+
testbench: 9.*
25+
- laravel: 10.*
26+
testbench: 8.*
27+
- laravel: 12.*
28+
testbench: 10.*
29+
30+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }}
2031

2132
steps:
2233
- name: Checkout code
2334
uses: actions/checkout@v4
2435

36+
- name: Cache dependencies
37+
uses: actions/cache@v4
38+
with:
39+
path: ~/.composer/cache/files
40+
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
41+
2542
- name: Setup PHP
2643
uses: shivammathur/setup-php@v2
2744
with:
2845
php-version: ${{ matrix.php }}
29-
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
30-
coverage: none
31-
32-
- name: Setup problem matchers
33-
run: |
34-
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
35-
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
3646

3747
- name: Install dependencies
3848
run: |
39-
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
40-
composer install
49+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
50+
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
4151
4252
- name: Execute tests
43-
run: vendor/bin/pest
53+
run: vendor/bin/pest

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@
1717
],
1818
"require": {
1919
"php": "^8.1",
20-
"illuminate/console": "^10.0 | ^11.0",
20+
"illuminate/console": "^10.0 | ^11.0 | ^12.0",
2121
"spatie/laravel-package-tools": "^1.18",
22-
"illuminate/contracts": "^10.0 | ^11.0"
22+
"illuminate/contracts": "^10.0 | ^11.0 | ^12.0"
2323
},
2424
"require-dev": {
2525
"laravel/pint": "^1.20",
2626
"nunomaduro/collision": "^7.11 | ^8.5",
2727
"pestphp/pest": "^2.36 | ^3.7",
2828
"pestphp/pest-plugin-laravel": "^2.4 | ^3.0",
29-
"orchestra/testbench": "^8.31 | ^9.9",
29+
"orchestra/testbench": "^9.9 | ^10.0",
3030
"phpunit/phpunit": "^10.5 | ^11.5",
3131
"phpstan/extension-installer": "^1.4",
3232
"larastan/larastan": "^2.9 | ^3.0",

0 commit comments

Comments
 (0)