fix: skip frontend tests when frontend dir absent in sparse worktrees

script/test unconditionally cd'd into frontend/ and ran npm test, which
failed in sparse-checkout worktrees that only contain the server/ subtree.
Guard the frontend step with a directory existence check so acceptance
gates pass for worktrees that have no frontend checkout.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Dave
2026-03-18 09:30:51 +00:00
parent d537aceb63
commit 29fc761980

View File

@@ -8,8 +8,12 @@ echo "=== Running Rust tests ==="
cargo test --manifest-path "$PROJECT_ROOT/Cargo.toml" cargo test --manifest-path "$PROJECT_ROOT/Cargo.toml"
echo "=== Running frontend unit tests ===" echo "=== Running frontend unit tests ==="
if [ -d "$PROJECT_ROOT/frontend" ]; then
cd "$PROJECT_ROOT/frontend" cd "$PROJECT_ROOT/frontend"
npm test npm test
else
echo "Skipping frontend tests (no frontend directory)"
fi
# Disabled: e2e tests may be causing merge pipeline hangs (no running server # Disabled: e2e tests may be causing merge pipeline hangs (no running server
# in merge workspace → Playwright blocks indefinitely). Re-enable once confirmed. # in merge workspace → Playwright blocks indefinitely). Re-enable once confirmed.