Skip to content

Commit 0b156f2

Browse files
authored
chore: optrimize modernjs ssr ci (#3666)
1 parent c14842f commit 0b156f2

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

.github/workflows/e2e-modern-ssr.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,16 @@ jobs:
4848
lsof -ti tcp:3050,3051,3052,3053,3054,3055,3056 | xargs -r kill &&
4949
pnpm run app:modern:dev &
5050
sleep 30 &&
51-
npx wait-on http://127.0.0.1:3051/mf-manifest.json &&
52-
npx wait-on http://127.0.0.1:3053/mf-manifest.json &&
53-
npx wait-on http://127.0.0.1:3055/mf-manifest.json &&
54-
npx wait-on http://127.0.0.1:3056/mf-manifest.json &&
55-
npx wait-on http://127.0.0.1:3054/mf-manifest.json &&
56-
npx wait-on http://127.0.0.1:3052/mf-manifest.json &&
57-
npx wait-on http://127.0.0.1:3050/mf-manifest.json &&
51+
# wait response content-type is application/json
52+
for port in 3050 3051 3052 3053 3054 3055 3056; do
53+
while true; do
54+
response=$(curl -s -I http://127.0.0.1:$port/mf-manifest.json)
55+
content_type=$(echo "$response" | grep -i "Content-Type" | awk '{print $2}' | tr -d '\r')
56+
if [[ $content_type != *"text/html"* ]]; then
57+
break
58+
fi
59+
sleep 1
60+
done
61+
done
5862
npx nx run modernjs-ssr-host:e2e &&
5963
lsof -ti tcp:3050,3051,3052,3053,3054,3055,3056 | xargs kill

0 commit comments

Comments
 (0)