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:
@@ -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 ==="
|
||||||
cd "$PROJECT_ROOT/frontend"
|
if [ -d "$PROJECT_ROOT/frontend" ]; then
|
||||||
npm test
|
cd "$PROJECT_ROOT/frontend"
|
||||||
|
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.
|
||||||
|
|||||||
Reference in New Issue
Block a user