File tree Expand file tree Collapse file tree 2 files changed +15
-15
lines changed Expand file tree Collapse file tree 2 files changed +15
-15
lines changed Original file line number Diff line number Diff line change 7979 - name : Install Playwright browsers
8080 working-directory : ./react-example
8181 run : yarn playwright:install --with-deps
82- - name : Install server management tools
83- working-directory : ./react-example
84- run : yarn add -D wait-on
8582 - name : Create environment configuration
8683 working-directory : ./react-example
8784 run : |
@@ -102,16 +99,20 @@ jobs:
10299 SERVER_PID=$!
103100 echo "Started server with PID: $SERVER_PID"
104101
105- # Wait for server to be ready with proper health check
106- yarn wait-on http://localhost:8080 --timeout 60000
107-
108- # Verify server health
109- curl -f http://localhost:8080 > /dev/null || {
110- echo "❌ Server health check failed"
111- ps aux | grep webpack
112- exit 1
113- }
114- echo "✅ Server is ready and healthy"
102+ # Wait for server to be ready with built-in health check
103+ for i in {1..12}; do
104+ if curl -f http://localhost:8080 >/dev/null 2>&1; then
105+ echo "✅ Server is ready and healthy"
106+ break
107+ fi
108+ if [ $i -eq 12 ]; then
109+ echo "❌ Server failed to start after 60 seconds"
110+ ps aux | grep webpack
111+ exit 1
112+ fi
113+ echo "Waiting for server... (attempt $i/12)"
114+ sleep 5
115+ done
115116 - name : Run Playwright tests
116117 working-directory : ./react-example
117118 run : |
Original file line number Diff line number Diff line change 6969 "webpack" : " ^5.99.9" ,
7070 "webpack-bundle-analyzer" : " ^4.10.2" ,
7171 "webpack-cli" : " ^6.0.1" ,
72- "webpack-dev-server" : " ^5.2.2" ,
73- "wait-on" : " ^6.0.1"
72+ "webpack-dev-server" : " ^5.2.2"
7473 },
7574 "dependencies" : {
7675 "axios" : " ^1.12.2" ,
You can’t perform that action at this time.
0 commit comments