Skip to content

Commit 3614c49

Browse files
committed
Use live sync for try-runtime-migrations test job
b/c try-runtime snapshots format has changed and the older files are no longer viable. See paritytech/substrate#12537
1 parent 630ebfa commit 3614c49

1 file changed

Lines changed: 14 additions & 20 deletions

File tree

.github/workflows/runtime-upgrade.yml

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -293,11 +293,7 @@ jobs:
293293
LC_GITHUB_REPO_ADMIN_TOKEN: ${{ secrets.GH_REPO_ADMIN_TOKEN }}
294294
LC_RUNNER_EPHEMERAL: false
295295

296-
test-migrations:
297-
env:
298-
SNAPSHOT_TIME: 12-19-22
299-
SNAPSHOT_DIR: /var/tmp/blockchain-snapshot
300-
SNAPSHOT_URL: "https://creditcoinblockchain.blob.core.windows.net/latestblocks/creditcoin-2.0-$GITHUB_BASE_REF-try-runtime-snapshot-$SNAPSHOT_TIME.tar.gz"
296+
test-migrations-via-try-runtime:
301297
# see https://gist.github.com/jonico/a94d03cac7a858e0613926d9f1bc7f2b
302298
runs-on:
303299
[self-hosted, "${{ needs.deploy-github-runner.outputs.runner_vm_name }}"]
@@ -327,33 +323,31 @@ jobs:
327323
run: |
328324
./scripts/check-hardware.sh
329325
330-
- name: Download try-runtime snapshots data for Creditcoin
326+
- name: Testnet ENV
327+
id: testnet-env
328+
if: github.base_ref == 'testnet'
331329
run: |
332-
echo "INFO: SNAPSHOT_URL=${{ env.SNAPSHOT_URL }}"
333-
echo "INFO: SNAPSHOT_DIR=${{ env.SNAPSHOT_DIR }}"
334-
335-
curl --silent ${{ env.SNAPSHOT_URL }} > snapshot.tar.gz
336-
337-
mkdir ${{ env.SNAPSHOT_DIR }}
338-
tar -xzvf ./snapshot.tar.gz -C ${{ env.SNAPSHOT_DIR }}
330+
echo "rpc_url=wss://rpc.testnet.creditcoin.network:443/ws" >> "$GITHUB_OUTPUT"
339331
340-
# standardize file names
341-
pushd ${{ env.SNAPSHOT_DIR }}
342-
mv creditcoin-*.child creditcoin.child
343-
mv creditcoin-*.top creditcoin.top
344-
popd
332+
- name: Mainnet ENV
333+
id: mainnet-env
334+
if: github.base_ref == 'main'
335+
run: |
336+
echo "rpc_url=wss://rpc.mainnet.creditcoin.network:443/ws" >> "$GITHUB_OUTPUT"
345337
346338
- name: Try-runtime migrations
347339
run: |
348340
./target/release/creditcoin-node try-runtime \
349341
--runtime ./target/release/creditcoin_node_runtime.compact.compressed.wasm \
350-
--dev on-runtime-upgrade snap --snapshot-path ${{ env.SNAPSHOT_DIR }}/creditcoin.
342+
--dev on-runtime-upgrade live --uri ${{ env.RPC_URL }}
343+
env:
344+
RPC_URL: ${{ steps.testnet-env.outputs.rpc_url || steps.mainnet-env.outputs.rpc_url }}
351345

352346
remove-github-runner:
353347
runs-on: ubuntu-22.04
354348
needs:
355349
- deploy-github-runner
356-
- test-migrations
350+
- test-migrations-via-try-runtime
357351
- execute-integration-tests
358352
if: ${{ always() && needs.deploy-github-runner.result != 'skipped' }}
359353

0 commit comments

Comments
 (0)