fix(ci): bun test 输出写到文件避免 GitHub log 截断
This commit is contained in:
parent
67515ccba9
commit
941df7e498
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
|
|
@ -29,11 +29,13 @@ jobs:
|
||||||
- name: Test
|
- name: Test
|
||||||
run: |
|
run: |
|
||||||
set +e
|
set +e
|
||||||
bun test 2>&1 | tee /tmp/ci-test.log
|
bun test > /tmp/ci-test.log 2>&1
|
||||||
TEST_EXIT=$?
|
TEST_EXIT=$?
|
||||||
FAILS=$(grep -oE '[0-9]+ fail' /tmp/ci-test.log | tail -1 | grep -oE '[0-9]+')
|
FAILS=$(grep -oE '[0-9]+ fail' /tmp/ci-test.log | tail -1 | grep -oE '[0-9]+')
|
||||||
if [ -z "$FAILS" ]; then FAILS=0; fi
|
if [ -z "$FAILS" ]; then FAILS=0; fi
|
||||||
echo "Failures: $FAILS (baseline: 4) | bun test exit: $TEST_EXIT"
|
echo "Failures: $FAILS (baseline: 4) | bun test exit: $TEST_EXIT"
|
||||||
|
# Show last 30 lines of test output
|
||||||
|
tail -30 /tmp/ci-test.log
|
||||||
if [ "$FAILS" -le 4 ]; then
|
if [ "$FAILS" -le 4 ]; then
|
||||||
echo "✅ Test baseline OK"
|
echo "✅ Test baseline OK"
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user