GitHub Action
Try Runtime
This action uses try-runtime-cli
to test your runtime migrations.
It will expect to have a snapshot passed as an argument and otherwise will take it for you if it doesn't exists yet.
Required URL of the node to take a snapshot from.
Path to a previsouly taken snapshot, if doesn't exists we will create it.
Required Path to a try-runtime enabled runtime to test migrations for.
You runtime must be compiled with
try-runtime
turned on.
Checks to run, default to all
.
uses: NodleCode/action-try-runtime
with:
url: 'https://rpc.nodleprotocol.io'
runtime: 'path/to/runtime.wasm'
- set outputs to something useful if possible
By convention please follow the release numbers from Parity's repo.
- Run the prebuild github action to pre-build
try-runtime
. Pass it the latest version from parity's repo (for examplev0.5.1
). - Wait for the action to build succesfully, which will take a little while.
- Update the first line in the action
Dockerfile
to use the version number of the new prebuilt container (in this examplev0.5.1
). - Draft a new github release for the same version number (
v0.5.1
in this example). - You may now use the newly release and built action in your CI/CD pipeline.
We prebuild a docker container with
try-runtime
to ensure Github does not rebuilttry-runtime
everytime we use this action, thus giving us a nice speed improvement.
Verify online version
docker run ghcr.io/nodlecode/try-runtime-cli:v0.5.1 try-runtime -V
Execute the prebuilt docker image
docker run -v ~/nodle/chain/snapshots:/snapshots ghcr.io/nodlecode/try-runtime-cli:v0.5.1 try-runtime --runtime ./snapshots/runtime_eden.wasm on-runtime-upgrade snap -p snapshots/eden-ci
Build and run image locally
cd base
docker build --build-arg VERSION=v0.5.1 . -t milkman -f ./Dockerfile
docker run milkman try-runtime --version
docker run milkman try-runtime --help
docker run -v ~/nodle/chain/snapshots:/snapshots milkman try-runtime --runtime ./snapshots/runtime_eden.wasm on-runtime-upgrade snap -p snapshots/eden-ci