Skip to content

Commit a5756d8

Browse files
committed
Update GitHub Actions for Laravel 12
1 parent 9696ebe commit a5756d8

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

.github/workflows/tests.yml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
branches:
66
- master
7-
- '*.x'
7+
- *.x
88
pull_request:
99
schedule:
1010
- cron: '0 0 * * *'
@@ -13,18 +13,22 @@ jobs:
1313
tests:
1414
runs-on: ubuntu-22.04
1515

16+
1617
strategy:
1718
fail-fast: true
1819
matrix:
1920
php: [8.2, 8.3, 8.4]
20-
laravel: [11]
21+
laravel: [11, '12']
22+
2123

2224
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }}
2325

26+
2427
steps:
2528
- name: Checkout code
2629
uses: actions/checkout@v4
2730

31+
2832
- name: Setup PHP
2933
uses: shivammathur/setup-php@v2
3034
with:
@@ -34,25 +38,30 @@ jobs:
3438
tools: composer:v2
3539
coverage: none
3640

41+
3742
- name: Install dependencies
3843
run: |
3944
composer require "illuminate/contracts=^${{ matrix.laravel }}" --dev --no-update
4045
composer update --prefer-dist --no-interaction --no-progress
4146
47+
4248
- name: Execute tests
4349
run: vendor/bin/phpunit --display-deprecations --fail-on-deprecation
4450

4551
stub-tests:
4652
runs-on: ubuntu-22.04
4753

54+
4855
strategy:
4956
fail-fast: true
5057
matrix:
5158
stack: [inertia, livewire]
52-
laravel: ['11.x-dev']
59+
laravel: [11.x-dev, 12.x]
60+
5361

5462
name: Test Stubs - Laravel ${{ matrix.laravel }} - ${{ matrix.stack }}
5563

64+
5665
steps:
5766
- name: Setup PHP
5867
uses: shivammathur/setup-php@v2
@@ -63,30 +72,36 @@ jobs:
6372
tools: composer:v2
6473
coverage: none
6574

75+
6676
- name: Setup Laravel
6777
run: |
6878
composer create-project laravel/laravel:^${{ matrix.laravel }} .
6979
composer require laravel/jetstream:@dev --no-interaction --no-update
7080
composer config repositories.jetstream '{"type": "path", "url": "jetstream"}' --file composer.json
7181
82+
7283
- name: Checkout code
7384
uses: actions/checkout@v4
7485
with:
75-
path: 'jetstream'
86+
path: jetstream
87+
7688

7789
- name: Install Jetstream
7890
run: |
7991
composer update "laravel/jetstream" --prefer-dist --no-interaction --no-progress -W
8092
php artisan jetstream:install ${{ matrix.stack }} --teams --api --verification --pest
8193
94+
8295
- name: Install NPM dependencies
8396
run: npm i
8497

98+
8599
- name: Compile assets
86100
run: npm run build
87101

102+
88103
- name: Execute tests
89104
run: vendor/bin/pest
90105
env:
91106
DB_CONNECTION: sqlite
92-
DB_DATABASE: ":memory:"
107+
DB_DATABASE: :memory:

0 commit comments

Comments
 (0)