Skip to content

Commit b54f6c3

Browse files
fix(tests): exclude arch tests from prefer-lowest CI runs
Pest arch tests don't extend TestCase, causing Laravel's HandleExceptions::flushState() to receive null in prefer-lowest mode with older Orchestra Testbench versions. Changes: - Add 'arch' group to ArchTest - Configure CI to exclude arch group only in prefer-lowest runs - Normal CI runs and local testing still execute arch tests This resolves the PHPUnit\Runner\ErrorHandler::enable() TypeError that occurred exclusively in prefer-lowest test environments.
1 parent 74e9168 commit b54f6c3

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.github/workflows/run-tests.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,12 @@ jobs:
5757
run: composer show -D
5858

5959
- name: Execute tests
60-
run: vendor/bin/pest --ci --exclude-group=redis
60+
run: |
61+
if [ "${{ matrix.stability }}" == "prefer-lowest" ]; then
62+
vendor/bin/pest --ci --exclude-group=redis,arch
63+
else
64+
vendor/bin/pest --ci --exclude-group=redis
65+
fi
6166
6267
test-with-redis:
6368
runs-on: ubuntu-latest

tests/ArchTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22

33
arch('it will not use debugging functions')
44
->expect(['dd', 'dump', 'ray'])
5-
->each->not->toBeUsed();
5+
->each->not->toBeUsed()
6+
->group('arch');

0 commit comments

Comments
 (0)