Skip to content

Commit

Permalink
Use live sync for try-runtime-migrations test job
Browse files Browse the repository at this point in the history
b/c try-runtime snapshots format has changed and the older files are no
longer viable. See
paritytech/substrate#12537
  • Loading branch information
atodorov committed Apr 21, 2023
1 parent 9f4b169 commit dcebdff
Showing 1 changed file with 14 additions and 20 deletions.
34 changes: 14 additions & 20 deletions .github/workflows/runtime-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -313,11 +313,7 @@ jobs:
LC_GITHUB_REPO_ADMIN_TOKEN: ${{ secrets.GH_REPO_ADMIN_TOKEN }}
LC_RUNNER_EPHEMERAL: false

test-migrations:
env:
SNAPSHOT_TIME: 12-19-22
SNAPSHOT_DIR: /var/tmp/blockchain-snapshot
SNAPSHOT_URL: "https://creditcoinblockchain.blob.core.windows.net/latestblocks/creditcoin-2.0-$GITHUB_BASE_REF-try-runtime-snapshot-$SNAPSHOT_TIME.tar.gz"
test-migrations-via-try-runtime:
# see https://gist.github.com/jonico/a94d03cac7a858e0613926d9f1bc7f2b
runs-on:
[self-hosted, "${{ needs.deploy-github-runner.outputs.runner_vm_name }}"]
Expand Down Expand Up @@ -347,33 +343,31 @@ jobs:
run: |
./scripts/check-hardware.sh
- name: Download try-runtime snapshots data for Creditcoin
- name: Testnet ENV
id: testnet-env
if: github.base_ref == 'testnet'
run: |
echo "INFO: SNAPSHOT_URL=${{ env.SNAPSHOT_URL }}"
echo "INFO: SNAPSHOT_DIR=${{ env.SNAPSHOT_DIR }}"
curl --silent ${{ env.SNAPSHOT_URL }} > snapshot.tar.gz
mkdir ${{ env.SNAPSHOT_DIR }}
tar -xzvf ./snapshot.tar.gz -C ${{ env.SNAPSHOT_DIR }}
echo "rpc_url=wss://rpc.testnet.creditcoin.network:443/ws" >> "$GITHUB_OUTPUT"
# standardize file names
pushd ${{ env.SNAPSHOT_DIR }}
mv creditcoin-*.child creditcoin.child
mv creditcoin-*.top creditcoin.top
popd
- name: Mainnet ENV
id: mainnet-env
if: github.base_ref == 'main'
run: |
echo "rpc_url=wss://rpc.mainnet.creditcoin.network:443/ws" >> "$GITHUB_OUTPUT"
- name: Try-runtime migrations
run: |
./target/release/creditcoin-node try-runtime \
--runtime ./target/release/creditcoin_node_runtime.compact.compressed.wasm \
--dev on-runtime-upgrade snap --snapshot-path ${{ env.SNAPSHOT_DIR }}/creditcoin.
--dev on-runtime-upgrade live --uri ${{ env.RPC_URL }}
env:
RPC_URL: ${{ steps.testnet-env.outputs.rpc_url || steps.mainnet-env.outputs.rpc_url }}

remove-github-runner:
runs-on: ubuntu-22.04
needs:
- deploy-github-runner
- test-migrations
- test-migrations-via-try-runtime
- execute-integration-tests
if: ${{ always() && needs.deploy-github-runner.result != 'skipped' }}

Expand Down

0 comments on commit dcebdff

Please sign in to comment.