Skip to content

Commit

Permalink
updated the wait step to kill and restart that instead of the service
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed May 20, 2024
1 parent 0011cf0 commit 6e2ac47
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion .github/workflows/pr_ci_playwright_e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,26 @@ jobs:
- name: Wait for web server to be ready
working-directory: ./frontend
run: |
yarn wait-on http://localhost:3000
MAX_ATTEMPTS=3
WAIT_TIME=30
ATTEMPT=1
while [[ $ATTEMPT -le $MAX_ATTEMPTS ]]
do
echo "Attempt $ATTEMPT of $MAX_ATTEMPTS"
yarn wait-on http://localhost:3000 --timeout ${WAIT_TIME}000
if [[ $? -eq 0 ]]; then
echo "Server is ready!"
break
else
echo "Server not ready, retrying..."
ATTEMPT=$((ATTEMPT + 1))
if [[ $ATTEMPT -gt $MAX_ATTEMPTS ]]; then
echo "Server failed to start after $MAX_ATTEMPTS attempts."
exit 1
fi
sleep 1
fi
done
- name: Run Playwright tests
working-directory: ./frontend
Expand Down

0 comments on commit 6e2ac47

Please sign in to comment.