From 0f4165a477d8ce40a5d5a08b6a22e133f931683d Mon Sep 17 00:00:00 2001 From: Alex Gartner Date: Thu, 5 Sep 2024 10:22:36 -0700 Subject: [PATCH] add restart CI --- .github/workflows/ci.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c584e92..68d6ed5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -85,4 +85,23 @@ jobs: - name: Dump logs if: always() run: docker logs zetacored + - name: Ensure we can restart + run: | + docker stop zetacored + docker start zetacored + - name: Wait for healthy + run: | + while ! curl -s -f --data '{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":67}' -H 'Content-Type: application/json' http://localhost:8545; do + if ! docker ps | grep zetacored; then + echo "Container stopped?" + exit 1 + fi + df -h / + echo "waiting for zetacored health" + sleep 15 + done + - name: Dump logs (restart) + if: always() + run: docker logs --since 1m zetacored +