From c5f772e3c092f6be7e593009f5e006c4671c1960 Mon Sep 17 00:00:00 2001 From: Ermal Kaleci Date: Fri, 27 Jan 2023 16:08:37 +0100 Subject: [PATCH] run sidecard tests with chopsticks nodes (#171) --- .github/workflows/ci.yml | 2 ++ e2e/scripts/sidecard-chopsticks.sh | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 e2e/scripts/sidecard-chopsticks.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 86ef8965..1bdf8e9b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,3 +39,5 @@ jobs: - run: yarn lint - run: yarn test - run: yarn build + - name: Test substrate-api-sidecard with chopsticks node + run: sh e2e/scripts/sidecard-chopsticks.sh diff --git a/e2e/scripts/sidecard-chopsticks.sh b/e2e/scripts/sidecard-chopsticks.sh new file mode 100644 index 00000000..200c9050 --- /dev/null +++ b/e2e/scripts/sidecard-chopsticks.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +set -xe + +# clone sidecard +git clone https://github.com/paritytech/substrate-api-sidecar.git + +# start chopsticks node +yarn start dev --endpoint wss://rpc.polkadot.io --port 8000 & POLKADOT_PID=$! +yarn start dev --endpoint wss://statemint-rpc.polkadot.io --port 8001 & STATEMINT_PID=$! + +# run tests +(cd substrate-api-sidecar && \ +yarn && \ +yarn test:latest-e2e-tests --local ws://localhost:8000 --chain polkadot && \ +yarn test:latest-e2e-tests --local ws://localhost:8001 --chain statemint) + +#cleanup +rm -rf substrate-api-sidecar +kill $POLKADOT_PID +kill $STATEMINT_PID