Skip to content

Commit

Permalink
Wait until WebDriver hub is ready
Browse files Browse the repository at this point in the history
  • Loading branch information
compulim committed Dec 6, 2023
1 parent 34556e8 commit 212bfee
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/pull-request-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,25 @@ jobs:
- name: Run docker-compose up
run: docker-compose -f docker-compose-wsl2.yml up --detach --scale chrome=2

- name: Ping Web Driver hub
run: |
while true
do
curl http://localhost:4444/wd/hub/status > /tmp/wd-status.json
if [[ $? -eq 0 ]]
then
cat /tmp/wd-status.json | jq -r 'if (.value.ready != true) then halt_error(1) else empty end'
if [[ $? -eq 0 ]]
then
break
fi
fi
sleep 1
done
- name: Run jest --shard=${{ format('{0}/{1}', matrix.shard-index, matrix.shard-count) }}
run: |
./node_modules/.bin/jest \
Expand Down

0 comments on commit 212bfee

Please sign in to comment.