Skip to content

Polkadot v1.0.0 upgrade (#357) #9

Polkadot v1.0.0 upgrade (#357)

Polkadot v1.0.0 upgrade (#357) #9

Workflow file for this run

name: Testing RPC
on:
push:
branches:
- master
jobs:
testrpc:
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@v2
- name: install dependencies
run: |
sudo apt update
sudo apt-get install cmake coreutils libclang-dev protobuf-compiler -y
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2022-08-05
target: ${{ matrix.target }}
components: rustfmt, clippy
default: true
- name: Install WASM target (for runtime building)
shell: bash
run: rustup target add wasm32-unknown-unknown --toolchain nightly-2022-08-05
- name: Build and run reqres example node
shell: bash
run: |
base64 --decode protocol/examples/reqres/QmUnozNz2tmzDeckoShMHbvGp1yWi4BKBiudkELwoKCdcL > private.pk8
cd protocol/examples/reqres
cargo build --release
cd ../../..
- name: Build robonomics binary
uses: actions-rs/cargo@v1
with:
command: build
args: --release
- name: Run robonomics and send test rpc reqres Ping and Get
shell: bash
run: |
target/release/robonomics-request-response-example /ip4/127.0.0.1/tcp/61241 &
cd target/release/
./robonomics --dev &
sleep 20
curl http://localhost:9933 -H "Content-Type:application/json;charset=utf-8" -d '{ "jsonrpc":"2.0", "id":1, "method":"p2p_ping", "params": ["/ip4/127.0.0.1/tcp/61241/QmUnozNz2tmzDeckoShMHbvGp1yWi4BKBiudkELwoKCdcL"] }' | grep -q Pong
curl http://127.0.0.1:9933 -H "Content-Type:application/json;charset=utf-8" -d '{ "jsonrpc":"2.0", "id":1, "method":"p2p_get", "params": ["/ip4/127.0.0.1/tcp/61241/QmUnozNz2tmzDeckoShMHbvGp1yWi4BKBiudkELwoKCdcL","Meaning42"] }' | grep -q Meaning42