Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

ci: check runtime migrations #14618

Merged
merged 10 commits into from
Jul 27, 2023
46 changes: 46 additions & 0 deletions scripts/ci/gitlab/pipeline/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,56 @@
--extra-dependencies "$EXTRA_DEPENDENCIES"
--companion-overrides "$COMPANION_OVERRIDES"

.check-runtime-migration:
extends: .check-dependent-project
variables:
DEPENDENT_REPO: polkadot
COMPANION_OVERRIDES: |
substrate: polkadot-v*
polkadot: release-v*
COMPANION_CHECK_COMMAND: >
time cargo build --release --locked -p "$NETWORK"-runtime &&
time cargo run --locked --release --features try-runtime try-runtime \
--runtime ./target/release/wbuild/"$NETWORK"-runtime/target/wasm32-unknown-unknown/release/"$NETWORK"_runtime.wasm \
--chain=${NETWORK}-dev \
on-runtime-upgrade --checks=pre-and-post live --uri wss://${NETWORK}-try-runtime-node.parity-chains.parity.io:443

# Individual jobs are set up for each dependent project so that they can be ran in parallel.
# Arguably we could generate a job for each companion in the PR's description using Gitlab's
# parent-child pipelines but that's more complicated.

check-runtime-migration-polkadot:
extends:
- .check-runtime-migration
variables:
NETWORK: polkadot
rules:
- if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ #PRs
liamaharon marked this conversation as resolved.
Show resolved Hide resolved
liamaharon marked this conversation as resolved.
Show resolved Hide resolved

check-runtime-migration-kusama:
extends:
- .check-runtime-migration
variables:
NETWORK: kusama
rules:
- if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ #PRs
liamaharon marked this conversation as resolved.
Show resolved Hide resolved

check-runtime-migration-rococo:
extends:
- .check-runtime-migration
variables:
NETWORK: rococo
rules:
- if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ #PRs
liamaharon marked this conversation as resolved.
Show resolved Hide resolved

check-runtime-migration-westend:
extends:
- .check-runtime-migration
variables:
NETWORK: westend
rules:
- if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ #PRs
liamaharon marked this conversation as resolved.
Show resolved Hide resolved

check-dependent-polkadot:
extends: .check-dependent-project
variables:
Expand Down