Skip to content

Commit 59bc61f

Browse files
abnegateclaude
andcommitted
(fix): use PIPESTATUS to capture phpunit exit code through tee pipe
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent c7f8284 commit 59bc61f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/tests.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,13 @@ jobs:
5353

5454
- name: Run tests with coverage
5555
run: |
56+
set +e
5657
./vendor/bin/phpunit --testsuite Integration --coverage-clover=coverage/integration.xml --coverage-text 2>&1 | tee coverage/integration-summary.txt
57-
EXIT=$?
58+
EXIT=${PIPESTATUS[0]}
59+
set -e
5860
# Swoole can segfault on process exit after coverage generation;
5961
# treat it as success if the clover report was written.
60-
if [ $EXIT -eq 139 ] && [ -f coverage/integration.xml ]; then
62+
if [ "$EXIT" -eq 139 ] && [ -f coverage/integration.xml ]; then
6163
echo "Swoole exit segfault (ignored — coverage report exists)"
6264
exit 0
6365
fi

0 commit comments

Comments
 (0)