Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Commit

Permalink
TEST debug plugin integration testing
Browse files Browse the repository at this point in the history
  • Loading branch information
jacque006 committed Jul 18, 2024
1 parent 9d0c4cc commit f31272a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
run: ./script/start.sh &

- name: Wait for bundler at port 3000
run: RPC_URL='localhost:3000' SLEEP_DURATION_SECONDS=1 ./script/wait-for-rpc.sh
run: RPC_URL='localhost:3000' SLEEP_DURATION_SECONDS=1 ./script/wait-for-rpc.sh || docker ps || docker ps -q | xargs -L 1 docker logs

- name: Run hardhat integration tests
run: yarn hardhat test
3 changes: 2 additions & 1 deletion packages/plugins/script/wait-for-rpc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ max_tries=100
counter=0

function check_rpc() {
curl -s -X POST \
curl -X POST \
--data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":0}' \
-H "Content-Type: application/json" \
"$RPC_URL" \
> /dev/null
}

while ! check_rpc; do
echo "sleeping for $SLEEP_DURATION_SECONDS"
sleep $SLEEP_DURATION_SECONDS
counter=$((counter + 1))
if (( counter >= max_tries )); then
Expand Down

0 comments on commit f31272a

Please sign in to comment.