Skip to content

Commit

Permalink
Merge pull request #17 from iksaku/laravel-12
Browse files Browse the repository at this point in the history
Trying to fix tests for Laravel 12. Deprecate EOL Laravel versions
  • Loading branch information
iksaku authored Mar 1, 2025
2 parents 2161617 + b6bdc1e commit 99f363a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 32 deletions.
29 changes: 5 additions & 24 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,33 +17,14 @@ jobs:
strategy:
fail-fast: true
matrix:
php: [8.3, 8.2, 8.1, 8.0]
laravel: ['8.*', '9.*', '10.*', '11.*', '12.*']
php: [8.2, 8.3, 8.4]
laravel: ['11.*', '12.*']
stability: [prefer-lowest, prefer-stable]
include:
- laravel: 8.*
testbench: ^6.15
carbon: ^2.63
- laravel: 9.*
testbench: 7.*
carbon: ^2.63
- laravel: 10.*
testbench: 8.*
carbon: ^2.63
- laravel: 11.*
testbench: 9.*
carbon: ^2.63
exclude:
- laravel: 10.*
php: 8.0
- laravel: 11.*
php: 8.1
- laravel: 11.*
php: 8.0
- laravel: 12.*
php: 8.1
- laravel: 12.*
php: 8.0
testbench: 10.*

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }}

Expand All @@ -65,8 +46,8 @@ jobs:
- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "nesbot/carbon:${{ matrix.carbon }}" --no-interaction --no-update
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
- name: Execute tests
run: vendor/bin/pest
run: vendor/bin/pest --ci
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.idea
.php_cs
.php_cs.cache
.phpunit.result.cache
.phpunit.cache
build
composer.lock
coverage
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
}
],
"require": {
"php": "^8.0",
"illuminate/database": "^8.71|^9.0|^10.0|^11.0|^12.0",
"illuminate/support": "^8.71|^9.0|^10.0|^11.0|^12.0"
"php": "^8.2",
"illuminate/database": "^11.0|^12.0",
"illuminate/support": "^11.0|^12.0"
},
"require-dev": {
"orchestra/testbench": "^8.0|^9.0|^10.0",
Expand Down
10 changes: 6 additions & 4 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,14 @@
failOnRisky="true"
failOnEmptyTestSuite="true"
beStrictAboutOutputDuringTests="true"
verbose="true"
cacheDirectory=".phpunit.cache"
>
<testsuites>
<testsuite name="Feature Tests">
<directory suffix="Test.php">tests/Feature</directory>
</testsuite>
</testsuites>
<coverage>
<include>
<directory suffix=".php">./src</directory>
</include>
<report>
<html outputDirectory="build/coverage"/>
<text outputFile="build/coverage.txt"/>
Expand All @@ -29,4 +26,9 @@
<logging>
<junit outputFile="build/report.junit.xml"/>
</logging>
<source>
<include>
<directory suffix=".php">./src</directory>
</include>
</source>
</phpunit>

0 comments on commit 99f363a

Please sign in to comment.