Skip to content

Commit b8da74a

Browse files
committed
feat: test start api
1 parent 03b6645 commit b8da74a

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.github/workflows/postman.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,20 @@ jobs:
5959
npm run dev > $GITHUB_WORKSPACE/api.log 2>&1 &
6060
- name: Wait for api
6161
run: |
62-
echo "Waiting for API to be ready..."
63-
while ! curl -s -f -o /dev/null http://localhost:8080/v2/builds; do
62+
echo "Pinging API 30 times every 10 seconds..."
63+
for i in {1..30}; do
64+
echo "Ping $i:"
65+
curl -s -o /dev/null -w "%{http_code}\n" http://localhost:8080/v2/builds || echo "Request failed"
6466
sleep 10
6567
done
66-
echo "API is ready!"
68+
echo "Done pinging API."
69+
# - name: Wait for api
70+
# run: |
71+
# echo "Waiting for API to be ready..."
72+
# while ! curl -s -f -o /dev/null http://localhost:8080/v2/builds; do
73+
# sleep 10
74+
# done
75+
# echo "API is ready!"
6776
- name: Install Postman CLI
6877
run: |
6978
curl -o- "https://dl-cli.pstmn.io/install/linux64.sh" | sh

0 commit comments

Comments
 (0)