Skip to content

Commit 0f50237

Browse files
authored
Added support for Laravel 12 (#104)
Closes #103.
1 parent b7b23c1 commit 0f50237

File tree

2 files changed

+56
-3
lines changed

2 files changed

+56
-3
lines changed

.github/workflows/phpunit-l12.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Run PHPUnit tests L12.*
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
tests:
13+
runs-on: ubuntu-latest
14+
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
php: [8.2, 8.3, 8.4]
19+
laravel: [12.*]
20+
dependency: [prefer-lowest, prefer-stable]
21+
include:
22+
- laravel: 12.*
23+
testbench: 10.*
24+
25+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency }}
26+
27+
steps:
28+
- name: Checkout code
29+
uses: actions/checkout@v3
30+
31+
- name: Cache dependencies
32+
uses: actions/cache@v3
33+
with:
34+
path: ~/.composer/cache/files
35+
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
36+
37+
- name: Setup PHP
38+
uses: shivammathur/setup-php@v2
39+
with:
40+
php-version: ${{ matrix.php }}
41+
extensions: dom, curl, libxml, mbstring, pcntl, intl, exif, iconv
42+
coverage: none
43+
44+
- name: Install dependencies
45+
run: |
46+
composer require "illuminate/support:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
47+
composer update --${{ matrix.dependency }} --prefer-dist --no-interaction --no-suggest
48+
49+
- name: Migrate configuration file
50+
run: vendor/bin/phpunit --migrate-configuration
51+
52+
- name: Execute tests
53+
run: vendor/bin/phpunit

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
],
1515
"require": {
1616
"php": "^7.3 | ^7.4 | ^8.0",
17-
"illuminate/support": "^8.71 | ^9.0 | ^10.0 | ^11.0"
17+
"illuminate/support": "^8.71 | ^9.0 | ^10.0 | ^11.0 | ^12.0"
1818
},
1919
"require-dev": {
20-
"orchestra/testbench": "^6.23 | ^7.0 | ^8.0 | ^9.0",
21-
"phpunit/phpunit": "^9.5.10 | ^10.5",
20+
"orchestra/testbench": "^6.23 | ^7.0 | ^8.0 | ^9.0 | ^10.0",
21+
"phpunit/phpunit": "^9.5.10 | ^10.5 | ^11.5.3",
2222
"mockery/mockery": "^1.4.4"
2323
},
2424
"autoload": {

0 commit comments

Comments
 (0)