From 46ba6a3787c844df5d01bbeaf66f613889f5b5ef Mon Sep 17 00:00:00 2001 From: evgeniy-scherbina Date: Mon, 12 Aug 2024 14:16:38 -0400 Subject: [PATCH] Previous commit actually work; update CI in this commit --- .../scripts/kava-localnet-ci/construction.sh | 7 +++++++ .github/scripts/kava-localnet-ci/setup.sh | 18 ++++++++++++++++++ .github/workflows/process_kava_dispatch.yml | 9 +++++++++ 3 files changed, 34 insertions(+) create mode 100644 .github/scripts/kava-localnet-ci/construction.sh create mode 100755 .github/scripts/kava-localnet-ci/setup.sh diff --git a/.github/scripts/kava-localnet-ci/construction.sh b/.github/scripts/kava-localnet-ci/construction.sh new file mode 100644 index 0000000..c93fb1c --- /dev/null +++ b/.github/scripts/kava-localnet-ci/construction.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# downloading cli +curl -sSfL https://raw.githubusercontent.com/coinbase/rosetta-cli/master/scripts/install.sh | sh -s v0.10.0 + +echo "start check:construction" +./bin/rosetta-cli --configuration-file rosetta-cli-conf/kava-testnet-ci/config.json check:construction diff --git a/.github/scripts/kava-localnet-ci/setup.sh b/.github/scripts/kava-localnet-ci/setup.sh new file mode 100755 index 0000000..b6ddce7 --- /dev/null +++ b/.github/scripts/kava-localnet-ci/setup.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +make run-local & +make run-local-offline & + +sleep 5 + +block_tip=($(curl -s --location --request POST 'http://localhost:8000/network/status' \ +--header 'Content-Type: application/json' \ +--data-raw '{ + "network_identifier": { + "blockchain": "Kava", + "network": "kava-localnet" + } +}' | python3 -c 'import json,sys;obj=json.load(sys.stdin);print(obj["current_block_identifier"]["index"])')) + +echo "latest block index is", $block_tip + diff --git a/.github/workflows/process_kava_dispatch.yml b/.github/workflows/process_kava_dispatch.yml index 94de7b8..65d0fc2 100644 --- a/.github/workflows/process_kava_dispatch.yml +++ b/.github/workflows/process_kava_dispatch.yml @@ -61,4 +61,13 @@ jobs: run: KAVA_RPC_URL=http://localhost:26657 NETWORK=kava-local PORT=4000 SKIP_LIVE_NODE_TESTS=true make test-integration working-directory: ./rosetta-kava + - name: Download cli + run: "curl -sSfL https://raw.githubusercontent.com/coinbase/rosetta-cli/master/scripts/install.sh | sh -s" + - name: Start rosetta server + run: ${GITHUB_WORKSPACE}/rosetta-kava/.github/scripts/kava-localnet-ci/setup.sh + shell: bash + + - name: Run Check:construction test + run: ${GITHUB_WORKSPACE}/rosetta-kava/.github/scripts/kava-localnet-ci/construction.sh + shell: bash \ No newline at end of file