Skip to content

Commit 0f79150

Browse files
authored
Added Laravel 11.x support (#10)
1 parent 5652173 commit 0f79150

File tree

2 files changed

+59
-15
lines changed

2 files changed

+59
-15
lines changed

Diff for: .github/workflows/run-tests.yml

+53-9
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,23 @@ on:
55
branches: [main]
66
pull_request:
77
branches: [main]
8-
schedule:
9-
- cron: '0 0 * * *'
108

119
jobs:
12-
test:
13-
runs-on: ${{ matrix.os }}
10+
ubuntu:
11+
runs-on: ubuntu-latest
12+
1413
strategy:
15-
fail-fast: true
14+
fail-fast: false
1615
matrix:
17-
os: [ubuntu-latest, windows-latest]
18-
php: [8.1]
19-
laravel: ['9.50', 10]
16+
php: [8.1, 8.2]
17+
laravel: [10, '11']
2018
coverage-driver: [pcov]
2119
stability: [prefer-lowest, prefer-stable]
20+
exclude:
21+
- laravel: '11'
22+
php: 8.1
2223

23-
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
24+
name: Ubuntu - P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }}
2425

2526
steps:
2627
- name: Checkout code
@@ -48,3 +49,46 @@ jobs:
4849

4950
- name: Send code coverage report to Codecov.io
5051
uses: codecov/codecov-action@v4
52+
53+
windows:
54+
runs-on: windows-latest
55+
56+
strategy:
57+
fail-fast: false
58+
matrix:
59+
php: [8.1, 8.2]
60+
laravel: [10, '11']
61+
coverage-driver: [pcov]
62+
stability: [prefer-lowest, prefer-stable]
63+
exclude:
64+
- laravel: '11'
65+
php: 8.1
66+
67+
name: Windows - P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }}
68+
69+
steps:
70+
- name: Checkout code
71+
uses: actions/checkout@v4
72+
73+
- name: Setup PHP
74+
uses: shivammathur/setup-php@v2
75+
with:
76+
php-version: ${{ matrix.php }}
77+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
78+
coverage: ${{ matrix.coverage-driver }}
79+
80+
- name: Setup problem matchers
81+
run: |
82+
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
83+
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
84+
85+
- name: Install dependencies
86+
run: |
87+
composer require "illuminate/contracts=${{ matrix.laravel }}.*" --no-interaction --no-update
88+
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
89+
90+
- name: Execute tests
91+
run: vendor/bin/phpunit --coverage-clover=coverage.xml
92+
93+
- name: Send code coverage report to Codecov.io
94+
uses: codecov/codecov-action@v4

Diff for: composer.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616
}
1717
],
1818
"require": {
19-
"php": "^8.1",
20-
"illuminate/contracts": "^9.5|^10.0",
21-
"illuminate/database": "^9.5|^10.0",
22-
"illuminate/support": "^9.5|^10.0"
19+
"php": "^8.1|^8.2",
20+
"illuminate/contracts": "^10.0|^11.0",
21+
"illuminate/database": "^10.0|^11.0",
22+
"illuminate/support": "^10.0|^11.0"
2323
},
2424
"require-dev": {
25-
"orchestra/testbench": "^7.5|^8.0",
26-
"phpunit/phpunit": "^9.5"
25+
"orchestra/testbench": "^8.0|^9.0",
26+
"phpunit/phpunit": "^9.5|^10.0"
2727
},
2828
"autoload": {
2929
"psr-4": {

0 commit comments

Comments
 (0)