diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 0f9d82a5..a426ef00 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -129,11 +129,11 @@ jobs: with: dependencies: ${{ matrix.dependencies }} - - name: 🧪 Run unit tests using pestphp/pest + - name: 🧪 Run unit tests using phpunit/phpunit run: composer test - - name: 🧪 Run tests that require separate process using phpunit/phpunit - run: composer test:sep + - name: 🧪 Run arch tests using pestphp/pest + run: composer test:arch compile-phar: timeout-minutes: 4 diff --git a/composer.json b/composer.json index 6e3dd385..5b8ba89c 100644 --- a/composer.json +++ b/composer.json @@ -128,15 +128,12 @@ "stan:ci": "phpstan analyse --memory-limit=2G --error-format=github", "test": [ "@putenv XDEBUG_MODE=coverage", - "pest --exclude-group=phpunit-only --color=always" + "phpunit --color=always" ], + "test:arch": "pest --color=always --configuration pest.xml.dist", "test:cc": [ "@putenv XDEBUG_MODE=coverage", - "pest --coverage --coverage-clover=.build/phpunit/logs/clover.xml --exclude-group=phpunit-only --color=always" - ], - "test:sep": [ - "@putenv XDEBUG_MODE=coverage", - "phpunit --group=phpunit-only --color=always --exclude-testsuite=Arch" + "phpunit --coverage-clover=.build/phpunit/logs/clover.xml --color=always" ] } } diff --git a/pest.xml.dist b/pest.xml.dist new file mode 100644 index 00000000..2d40f524 --- /dev/null +++ b/pest.xml.dist @@ -0,0 +1,30 @@ + + + + + + + + tests/Arch + + + + + src + + + tests + src/Test + + + diff --git a/phpunit.xml.dist b/phpunit.xml.dist index c80bb641..447a7e3c 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -17,9 +17,6 @@ tests/Unit - - tests/Arch - diff --git a/tests/Unit/Client/FunctionTrapTest.php b/tests/Unit/Client/FunctionTrapTest.php index 51c51196..bbbd5469 100644 --- a/tests/Unit/Client/FunctionTrapTest.php +++ b/tests/Unit/Client/FunctionTrapTest.php @@ -4,14 +4,12 @@ namespace Buggregator\Trap\Tests\Unit\Client; -use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\Attributes\RunInSeparateProcess; use PHPUnit\Framework\TestCase; final class FunctionTrapTest extends TestCase { #[RunInSeparateProcess] - #[Group('phpunit-only')] public function testLeak(): void { $object = new \stdClass(); diff --git a/tests/Unit/Client/TrTest.php b/tests/Unit/Client/TrTest.php index 0ce8b85b..62ae2f01 100644 --- a/tests/Unit/Client/TrTest.php +++ b/tests/Unit/Client/TrTest.php @@ -5,7 +5,6 @@ namespace Buggregator\Trap\Tests\Unit\Client; use Buggregator\Trap\Client\TrapHandle\Dumper; -use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\Attributes\RunInSeparateProcess; use Symfony\Component\VarDumper\Dumper\DataDumperInterface; @@ -21,7 +20,6 @@ public function testLabel(): void * Check the stacktrace contains three items and it begins with the right function name. */ #[RunInSeparateProcess] - #[Group('phpunit-only')] public function testTrAsStackTrace(): void { tr();