Skip to content

Commit 1c3756d

Browse files
fix(ci): add health check to ensure app is running before Cypress tests
1 parent 72fffa6 commit 1c3756d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/integration.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,18 @@ jobs:
5757
- name: Install examples
5858
run: npm run install:examples
5959

60+
- name: Wait for app to be reachable
61+
run: |
62+
echo "Waiting for CRA app to respond on port 3000..."
63+
for i in {1..20}; do
64+
if curl -s http://127.0.0.1:3000 > /dev/null; then
65+
echo "App is up!"
66+
break
67+
fi
68+
echo "Still waiting... ($i)"
69+
sleep 3
70+
done
71+
6072
- name: Run integration test (CRA)
6173
run: |
6274
npx start-server-and-test start:api 3001 start:cra http-get://127.0.0.1:3000 "npm run cypress:run -- --browser chrome --headless"

0 commit comments

Comments
 (0)