Fail CI when 0 tests run — 0/0/0 is never a pass
If pytest reports 0 passed, 0 failed, 0 skipped, treat it as a failure. Something is wrong if no tests ran at all. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
0772d24cab
commit
b8c4fe7cc2
@ -92,6 +92,11 @@ if [ "$TEST_EXIT" -ne 0 ] && [ "$PASS_COUNT" = "0" ] && [ "$FAIL_COUNT" = "0" ];
|
|||||||
echo "$TEST_OUTPUT" | tail -5
|
echo "$TEST_OUTPUT" | tail -5
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$PASS_COUNT" = "0" ] && [ "$FAIL_COUNT" = "0" ] && [ "$SKIP_COUNT" = "0" ]; then
|
||||||
|
OVERALL="fail"
|
||||||
|
echo "FAIL: 0 tests ran — something is wrong"
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Tests: $PASS_COUNT passed, $FAIL_COUNT failed, $SKIP_COUNT skipped, $ERROR_COUNT errors"
|
echo "Tests: $PASS_COUNT passed, $FAIL_COUNT failed, $SKIP_COUNT skipped, $ERROR_COUNT errors"
|
||||||
|
|
||||||
if [ "$FAIL_COUNT" != "0" ] && [ "$FAIL_COUNT" != "" ]; then
|
if [ "$FAIL_COUNT" != "0" ] && [ "$FAIL_COUNT" != "" ]; then
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user