Skip to content

Commit 5c01e90

Browse files
authored
Merge pull request #4 from imliam/l12-support
Add support for Laravel 12
2 parents ab0d0d8 + 83e4869 commit 5c01e90

File tree

3 files changed

+47
-44
lines changed

3 files changed

+47
-44
lines changed

.github/workflows/main.yml

Lines changed: 41 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,43 @@
1-
name: Run Tests
2-
on: [push]
1+
name: run-tests
2+
3+
on:
4+
- push
5+
- pull_request
36

47
jobs:
5-
run:
6-
runs-on: ubuntu-latest
7-
strategy:
8-
max-parallel: 15
9-
fail-fast: false
10-
matrix:
11-
php-versions: ['7.3', '7.4']
12-
composer-flags: ['--prefer-lowest', '--prefer-stable']
13-
env:
14-
- LARAVEL_VERSION='^7.0' TESTBENCH_VERSION='^5.0'
15-
- LARAVEL_VERSION='^8.0' TESTBENCH_VERSION='^6.0'
16-
name: Test on PHP ${{ matrix.php-versions }}, Laravel ${{ matrix.laravel-versions }} and ${{ matrix.composer-flags }}
17-
steps:
18-
- name: Checkout
19-
uses: actions/checkout@master
20-
- name: Install PHP
21-
uses: shivammathur/setup-php@master
22-
with:
23-
php-version: ${{ matrix.php-versions }}
24-
- name: Check Environment
25-
run: |
26-
${{ matrix.env }}
27-
php -v
28-
composer -V
29-
php -m
30-
echo "Laravel version ${LARAVEL_VERSION}"
31-
echo "Orchestra Testbench version ${TESTBENCH_VERSION}"
32-
- name: Install Dependencies
33-
run: |
34-
${{ matrix.env }}
35-
composer config discard-changes true
36-
composer self-update
37-
composer require --dev "laravel/framework:${LARAVEL_VERSION}" --no-interaction --no-update
38-
composer require --dev "orchestra/testbench:${TESTBENCH_VERSION}" --no-interaction --no-update
39-
composer update ${{ matrix.composer-flags }} --prefer-dist --no-suggest --no-interaction
40-
- name: Run PHPUnit
41-
run: php vendor/bin/phpunit
8+
test:
9+
runs-on: ${{ matrix.os }}
10+
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
os: [ubuntu-latest]
15+
php: [8.4, 8.3, 8.2]
16+
laravel: [^12.0, ^11.0]
17+
dependency-version: [prefer-lowest, prefer-stable]
18+
include:
19+
- laravel: ^11.0
20+
testbench: ^9.0
21+
- laravel: ^12.0
22+
testbench: ^10.0
23+
24+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
25+
26+
steps:
27+
- name: Checkout code
28+
uses: actions/checkout@v4
29+
30+
- name: Setup PHP
31+
uses: shivammathur/setup-php@v2
32+
with:
33+
php-version: ${{ matrix.php }}
34+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
35+
coverage: none
36+
37+
- name: Install dependencies
38+
run: |
39+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
40+
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
41+
42+
- name: Execute tests
43+
run: vendor/bin/phpunit

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ docs
44
vendor
55
coverage
66
SCRATCH.md
7+
.phpunit.result.cache

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@
2020
}
2121
],
2222
"require": {
23-
"php": "^7.3",
24-
"illuminate/http": "^7.0|^8.0",
25-
"illuminate/support": "^7.0|^8.0"
23+
"php": "^8.0",
24+
"illuminate/http": "^11.0|^12.0",
25+
"illuminate/support": "^11.0|^12.0"
2626
},
2727
"require-dev": {
28-
"phpunit/phpunit": "^7.0|^8.0|^9.0",
28+
"phpunit/phpunit": "^11.0",
2929
"larapack/dd": "^1.0",
30-
"orchestra/testbench": "^5.0|^6.0"
30+
"orchestra/testbench": "^9.0|^10.0"
3131
},
3232
"autoload": {
3333
"psr-4": {

0 commit comments

Comments
 (0)