Skip to content

Commit 5b8c82f

Browse files
committed
ci update
1 parent 87b03cd commit 5b8c82f

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,14 @@ jobs:
5151
- name: Check Test Results
5252
run: |
5353
if [ -f "_test_results.log" ]; then
54-
FAILURES=$(grep -c "\\[FAIL\\]" _test_results.log || echo "0")
55-
PASSED=$(grep -c "\\[PASS\\]" _test_results.log || echo "0")
54+
# Use safer numeric handling with explicit defaults
55+
FAILURES=$(grep -c "\\[FAIL\\]" _test_results.log || true)
56+
FAILURES=${FAILURES:-0}
57+
58+
PASSED=$(grep -c "\\[PASS\\]" _test_results.log || true)
59+
PASSED=${PASSED:-0}
60+
61+
# Calculate total ensuring numeric values
5662
TOTAL=$((FAILURES + PASSED))
5763
5864
echo "::group::Complete Test Results"
@@ -64,7 +70,7 @@ jobs:
6470
if [ "$FAILURES" -gt 0 ]; then
6571
echo "::error::$FAILURES test(s) failed!"
6672
echo "Failed tests:"
67-
grep "\\[FAIL\\]" _test_results.log
73+
grep "\\[FAIL\\]" _test_results.log || true
6874
exit 1
6975
else
7076
echo "::notice::All $TOTAL tests passed successfully!"

0 commit comments

Comments
 (0)