diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 61c500f..1ed25a6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -41,10 +41,6 @@ jobs: go-version-file: 'go.mod' check-latest: true - - name: Install jq - env: - DEBIAN_FRONTEND: noninteractive - run: apt-get update && apt-get install -y jq # At present the stock setup-python action fails on Linux/aarch64 # Conditional steps below workaroud this by using deadsnakes for that case only - name: "Install Python for ARM on Linux" @@ -82,13 +78,13 @@ jobs: - name: Wait for testnet run: | # Start validator at current head, but not before Merge (block 1 on test chain) - echo "Waiting for chain head to progress..." while + echo "Waiting for chain head to progress..." height=$(./scripts/get-block-number.sh $ETH_HTTP_PATH) - [[ "$height" < 2 ]]; + [[ "$height" -lt 2 ]]; do sleep 5; done echo "Chain has reached block $height" echo VALIDATE_FROM_BLOCK=$height >> "$GITHUB_ENV" - name: Run tests run: | - go test ./integration/... -v -timeout=20m + go test -v -p 1 ./integration/... -timeout=20m diff --git a/scripts/get-block-number.sh b/scripts/get-block-number.sh index b388590..a51fa9c 100755 --- a/scripts/get-block-number.sh +++ b/scripts/get-block-number.sh @@ -6,6 +6,7 @@ geth_endpoint="${1:-$ETH_HTTP_PATH}" latest_block_hex=$(curl -s $geth_endpoint -X POST -H "Content-Type: application/json" \ --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":42}' | \ - jq -r .result) + python3 -c 'import json, sys; print(int(json.load(sys.stdin)["result"], 16))' \ +) printf "%d" $latest_block_hex