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

ci: always run runtime migration checks #7422

Merged
merged 13 commits into from
Jul 24, 2023
37 changes: 19 additions & 18 deletions scripts/ci/gitlab/pipeline/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ check-try-runtime:
- cargo check --locked --features try-runtime --all

# More info can be found here: https://github.com/paritytech/polkadot/pull/5865
# Works only in PRs with E1 label
.check-runtime-migration:
stage: check
extends:
Expand All @@ -60,23 +59,14 @@ check-try-runtime:
- .compiler-info
script:
- |
export has_runtimemigration_label=$(curl -sS -H "Accept: application/vnd.github+json" \
-H "Authorization: token $GITHUB_PR_TOKEN" \
https://api.github.com/repos/paritytech/polkadot/issues/$CI_COMMIT_REF_NAME/labels | grep "E0-runtime_migration" | wc -l)
- |
if [[ $has_runtimemigration_label != 0 ]]; then
echo "Found label runtime_migration. Running tests"
export RUST_LOG=remote-ext=debug,runtime=debug
echo "---------- Running try-runtime for ${NETWORK} ----------"
time cargo build --locked --release -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 \
-lruntime=debug \
--chain=${NETWORK}-dev \
on-runtime-upgrade live --uri wss://${NETWORK}-try-runtime-node.parity-chains.parity.io:443
else
echo "runtime_migration label not found. Skipping"
fi
echo "Found label runtime_migration. Running tests"
export RUST_LOG=remote-ext=debug,runtime=debug
echo "---------- Running try-runtime for ${NETWORK} ----------"
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 live --uri wss://${NETWORK}-try-runtime-node.parity-chains.parity.io:443

check-runtime-migration-polkadot:
stage: check
Expand Down Expand Up @@ -111,6 +101,17 @@ check-runtime-migration-westend:
NETWORK: "westend"
allow_failure: true # FIXME https://github.com/paritytech/substrate/issues/13107

check-runtime-migration-rococo:
stage: check
extends:
- .docker-env
- .test-pr-refs
- .compiler-info
- .check-runtime-migration
variables:
NETWORK: "rococo"
allow_failure: true # FIXME https://github.com/paritytech/substrate/issues/13107

# is broken, need to fix
check-no-default-features:
stage: check
Expand Down