Skip to content

Commit

Permalink
ci(workflows): Update PHP and Laravel versions in tests.yml
Browse files Browse the repository at this point in the history
- Upgrade PHP version from 8.3 to 8.4
- Add Laravel version 12.* to the testing matrix
- Include new testbench version 10.* for Laravel 12

This change ensures compatibility with the latest PHP and Laravel versions for more comprehensive testing.
  • Loading branch information
guanguans committed Mar 1, 2025
1 parent 9b199af commit 016f38f
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 18 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
php: [ 7.4, 8.3 ]
php: [ 7.4, 8.4 ]
dependency-version: [ prefer-stable ]
laravel: [ 8.0.*, 9.*, 10.*, 11.* ]
laravel: [ 8.0.*, 9.*, 10.*, 11.*, 12.* ]
include:
- laravel: 8.0.*
testbench: 6.*
Expand All @@ -21,14 +21,18 @@ jobs:
testbench: 8.*
- laravel: 11.*
testbench: 9.*
- laravel: 12.*
testbench: 10.*
exclude:
- php: 7.4
laravel: 9.*
- php: 7.4
laravel: 10.*
- php: 7.4
laravel: 11.*
- php: 8.3
- php: 7.4
laravel: 12.*
- php: 8.4
laravel: 8.0.*

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"orchestra/testbench": "^6.47 || ^7.0 || ^8.0 || ^9.0 || ^10.0",
"pestphp/pest": "^1.23 || ^2.0 || ^3.0",
"pestphp/pest-plugin-faker": "^1.0 || ^2.0 || ^3.0",
"pestphp/pest-plugin-laravel": "^1.2 || ^2.0",
"pestphp/pest-plugin-laravel": "^1.2 || ^2.0 || ^3.0",
"php-mock/php-mock-phpunit": "^2.10",
"phpstan/extension-installer": "^1.4",
"phpstan/phpstan-deprecation-rules": "^2.0",
Expand Down
39 changes: 25 additions & 14 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
cacheResultFile="build/phpunit/.phpunit.result.cache"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
verbose="true"
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
>
<!--printerClass="NunoMaduro\Collision\Adapters\Phpunit\Printer"-->
<!--printerClass="NunoMaduro\Collision\Adapters\Phpunit\Printers\DefaultPrinter"-->
<!--printerClass="NunoMaduro\Collision\Adapters\Phpunit\Printers\ReportablePrinter"-->
<testsuites>
<testsuite name="Guanguans Test Suite">
<directory>tests/</directory>
<exclude>vendor/</exclude>
</testsuite>
</testsuites>
<coverage>
<include>
<directory suffix=".php">src/</directory>
Expand All @@ -24,10 +26,19 @@
<file>src/SoarServiceProvider.php</file>
</exclude>
</coverage>
<testsuites>
<testsuite name="Guanguans Test Suite">
<directory>tests/</directory>
<exclude>vendor/</exclude>
</testsuite>
</testsuites>
<source>
<include>
<directory suffix=".php">src/</directory>
</include>
<exclude>
<!--<directory>src/Contracts/</directory>-->
<file>src/Support/QueryAnalyzer.php</file>
<file>src/SoarServiceProvider.php</file>
</exclude>
</source>
<extensions>
<!--<extension class="NunoMaduro\Collision\Adapters\Phpunit\Printer"/>-->
<!--<extension class="Ergebnis\PHPUnit\SlowTestDetector\Extension"/>-->
<!--<bootstrap class="Ergebnis\PHPUnit\SlowTestDetector\Extension"/>-->
</extensions>
</phpunit>

0 comments on commit 016f38f

Please sign in to comment.