fix(ci): capture test failure details before pod cleanup

The test-gate pod gets cleaned up immediately on failure, losing all
stdout. Pipe cargo test through tee and grep for FAILED/panicked
output before exiting, so failure logs are preserved in Argo.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
jgrusewski
2026-03-12 20:31:03 +01:00
parent 5e50c50336
commit 4d80d396f1

View File

@@ -314,7 +314,13 @@ spec:
cargo clippy --workspace --lib -- -D warnings
echo "=== Running tests (lib only, no integration) ==="
cargo test --workspace --lib
cargo test --workspace --lib 2>&1 | tee /tmp/test-output.log
TEST_EXIT=${PIPESTATUS[0]}
if [ "$TEST_EXIT" -ne 0 ]; then
echo "=== TEST FAILURES ==="
grep -A5 'FAILED\|panicked\|test result: FAILED' /tmp/test-output.log || true
exit "$TEST_EXIT"
fi
echo "=== Test gate passed ==="