Skip to content

Commit

Permalink
run sidecard tests with chopsticks nodes (#171)
Browse files Browse the repository at this point in the history
  • Loading branch information
ermalkaleci authored Jan 27, 2023
1 parent 279b58f commit c5f772e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
21 changes: 21 additions & 0 deletions e2e/scripts/sidecard-chopsticks.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit c5f772e

Please sign in to comment.