Skip to content

Commit 9449464

Browse files
committed
try again
1 parent 49d7a83 commit 9449464

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,6 @@ jobs:
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: |

react-example/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@
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",

0 commit comments

Comments
 (0)