diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8da67d4a92..f715dfd85a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -12,7 +12,7 @@ jobs: run-tests: runs-on: ubuntu-latest strategy: - fail-fast: false + fail-fast: true matrix: php: [8.4, 8.3, 8.2] laravel: [12.*, 11.*] @@ -79,9 +79,21 @@ jobs: - name: Cache Blade views run: ./vendor/bin/testbench view:cache - name: Execute tests (parallel) + id: parallel-tests + continue-on-error: true run: ./vendor/bin/pest --configuration=phpunit.${{ matrix.db }}.xml --parallel --exclude-group=commands env: DB_PASSWORD: password + - name: Execute tests (non-parallel fallback) + if: steps.parallel-tests.outcome == 'failure' + id: non-parallel-tests + run: ./vendor/bin/pest --configuration=phpunit.${{ matrix.db }}.xml --exclude-group=commands + env: + DB_PASSWORD: password + - name: Warn about parallel test failure + if: steps.parallel-tests.outcome == 'failure' && steps.non-parallel-tests.outcome == 'success' + run: | + echo "::warning::Parallel tests failed but non-parallel tests passed. This may indicate a race condition or test isolation issue." - name: Execute command tests (serial) run: ./vendor/bin/pest --configuration=phpunit.${{ matrix.db }}.xml --group=commands env: