fix(ci): 修复 bun test 非零退出码被 set -e 截断

This commit is contained in:
James Feng 2026-06-04 17:12:51 +08:00
parent df7fa26d23
commit 67515ccba9

View File

@ -28,13 +28,14 @@ jobs:
- name: Test
run: |
set +e
bun test 2>&1 | tee /tmp/ci-test.log
TEST_EXIT=$?
FAILS=$(grep -oE '[0-9]+ fail' /tmp/ci-test.log | tail -1 | grep -oE '[0-9]+')
if [ -z "$FAILS" ]; then FAILS=0; fi
echo "Failures: $FAILS (baseline: 4)"
echo "Failures: $FAILS (baseline: 4) | bun test exit: $TEST_EXIT"
if [ "$FAILS" -le 4 ]; then
echo "✅ Test baseline OK"
exit 0
else
echo "❌ Test regressions detected"
exit 1