This will show the differences between you local runtime and the remote runtime.
Including:
- storage
- runtime version
Take a look at the real example here.
Take Polkadot code/repository as an example.
Requirement.
- build your node
- upload it
- provide a live chain HTTP RPC endpoint to compare with
Build and upload.
jobs:
basic-checks:
name: Build and upload Polkadot
runs-on: ubuntu-latest
steps:
- name: Setup build environment
run: sudo apt install -y protobuf-compiler
- name: Fetch latest code
uses: actions/checkout@v3
- name: Build
run: |
cargo build --release --locked
mv target/release/polkadot .
- name: Upload
uses: actions/upload-artifact@v2
with:
# pass this name to `uploaded-artifact`
name: polkadot
path: polkadot
Check single runtime.
name: Checks
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
runtime-checks:
name: Task check runtime
needs: [basic-checks]
runs-on: ubuntu-latest
steps:
- name: Check
uses: actions/[email protected]
with:
uploaded-artifact: polkadot
chain: polkadot
compare-with: https://rpc.polkadot.io
Check multiple runtimes at once.
name: Checks
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
runtime-checks:
name: Task check runtimes
strategy:
matrix:
target: [
{ chain: polkadot-dev, compare-with: https://rpc.polkadot.io },
{ chain: kusama-dev, compare-with: https://kusama-rpc.polkadot.io },
]
needs: [basic-checks]
runs-on: ubuntu-latest
steps:
- name: Check ${{ matrix.target.chain }}
uses: hack-ink/[email protected]
with:
uploaded-artifact: polkadot
chain: ${{ matrix.target.chain }}
compare-with: ${{ matrix.target.compare-with }}