Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Commit

Permalink
add try-runtime github workflow (#245)
Browse files Browse the repository at this point in the history
* add try-runtime feature build

* fix  not found in scope issue

* fix cargo fmt issue

* add executor on try-runtime feature

* inline import

* add try-runtime workflow for storage migrations

* update workflow

* remove time

* use cache restore

* We do not need to check try-runtime feature on every PR

* missing symbol

* workflow should work on subsequent pushes

* update workflow

* add `paths-ignore`

* remove `cargo build`

* update Github action

* update Github action

* update to use contains

* Update Github Action

* Update Github Action
  • Loading branch information
brunopgalvao authored Jul 27, 2023
1 parent 6168897 commit fea97ed
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/try-runtime.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Test storage migration
# Test storage migration using try-runtume on PRs with label "migration"

on:
pull_request:
types: [labeled, synchronize]
push:
branches: [ main ]

jobs:
try_runtime:
if: contains(github.event.pull_request.labels.*.name, 'migration')
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3

- name: Setup worker
uses: "./.github/templates/setup-worker"

- name: Cache Build artefacts
uses: actions/cache/restore@v3
id: cargo-cache
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-release-${{ env.POLKA_VERSION }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-release-${{ env.POLKA_VERSION }}

- run: |
echo "Found label runtime_migration. Running tests"
export RUST_LOG=remote-ext=debug,runtime=debug
echo "---------- Running try-runtime for Trappist ----------"
cargo run -p trappist --locked --release --no-default-features --features trappist/trappist-runtime,try-runtime try-runtime \
--runtime ./target/release/wbuild/trappist-runtime/target/wasm32-unknown-unknown/release/trappist_runtime.wasm \
-lruntime=debug \
--chain=trappist-dev \
on-runtime-upgrade live --uri wss://rococo-trappist-try-runtime-node.parity-chains.parity.io:443

0 comments on commit fea97ed

Please sign in to comment.