A legged function chains with && : the || that captures the status suspends set -e
CI / gate (push) Successful in 28s
CI / publish (push) Has been skipped

This commit is contained in:
2026-09-20 00:07:06 +02:00
parent be25a7a3f5
commit 1fb712c76d
5 changed files with 47 additions and 40 deletions
+3 -5
View File
@@ -3,16 +3,14 @@ set -euo pipefail
cd "$(dirname "$0")"
source ./docker-runner.sh
test_log=$(mktemp)
leg "install ($node_image)" in_image "$node_image" npm ci
leg "typecheck ($node_image)" in_image "$node_image" npm run typecheck
# Streamed, and copied so the zero-test guard reads the count without trading the output for it.
test_log=$(mktemp)
node_tests() {
in_image "$node_image" npm test 2>&1 | tee "$test_log"
}
leg "install ($node_image)" in_image "$node_image" npm ci
leg "typecheck ($node_image)" in_image "$node_image" npm run typecheck
leg "tests ($node_image)" node_tests
if grep -q 'ℹ tests 0' "$test_log"; then
echo 'the gate ran zero tests — failing instead of a vacuous green'