fix(ci): 修复 bun test 非零退出码被 set -e 截断
This commit is contained in:
parent
df7fa26d23
commit
67515ccba9
5
.github/workflows/ci.yml
vendored
5
.github/workflows/ci.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user