Skip to content

Check runtime upgrade #66

Check runtime upgrade

Check runtime upgrade #66

name: Check runtime upgrade
# Check runtime upgradability of the released runtime.
# We do it in two ways:
# - by executing try-runtime-cli against the live chain
# - by simulating a runtime upgrade against the live chain
on:
release:
types: [released]
workflow_dispatch:
inputs:
release_tag:
description: runtime.wasm release_tag
required: false
env:
SUBWASM_VERSION: 0.19.1
RELEASE_TAG: ${{ github.event.inputs.release_tag || github.event.release.tag_name }}
jobs:
check-condition:
runs-on: ubuntu-22.04
outputs:
skip_simulation: ${{ steps.check.outputs.skip_simulation }}
steps:
- uses: actions/checkout@v4
- id: check
run: |
if [ -z "${{ env.RELEASE_TAG }}" ]; then
skip_simulation=true
else
skip_simulation=false
fi
echo "skip_simulation=$skip_simulation" | tee -a $GITHUB_OUTPUT
runtime-matrix:
runs-on: ubuntu-22.04
outputs:
runtime: ${{ steps.runtime.outputs.runtime }}
name: Parse runtime matrix
steps:
- uses: actions/checkout@v4
- id: runtime
run: |
TASKS=$(jq '[.[] | select(.uri != null)]' .github/runtime.json)
SKIPPED_TASKS=$(jq '[.[] | select(.uri == null)]' .github/runtime.json)
echo --- Running the following tasks ---
echo $TASKS
echo --- Skipping the following tasks due to not having a uri field ---
echo $SKIPPED_TASKS
TASKS=$(echo $TASKS | jq -c .)
echo "runtime=$TASKS" >> $GITHUB_OUTPUT
simulate-runtime-upgrade:
runs-on: ubuntu-22.04
needs:
- check-condition
- runtime-matrix
if: needs.check-condition.outputs.skip_simulation == 'false'
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
runtime: ${{ fromJSON(needs.runtime-matrix.outputs.runtime) }}
name: ${{ matrix.runtime.name }}
steps:
- name: Checkout codes on ${{ github.ref }}
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Enable corepack and pnpm
run: corepack enable && corepack enable pnpm
- name: Install subwasm ${{ env.SUBWASM_VERSION }}
run: |
wget https://github.com/chevdor/subwasm/releases/download/v${{ env.SUBWASM_VERSION }}/subwasm_linux_amd64_v${{ env.SUBWASM_VERSION }}.deb
sudo dpkg -i subwasm_linux_amd64_v${{ env.SUBWASM_VERSION }}.deb
subwasm --version
- name: Test runtime upgrade
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
timeout-minutes: 10
run: |
./parachain/scripts/runtime-upgrade.sh ${{ matrix.runtime.name }} ${{ matrix.runtime.uri }} ${{ env.RELEASE_TAG }}
try-runtime:
runs-on: ubuntu-22.04
needs:
- check-condition
- runtime-matrix
strategy:
fail-fast: false
matrix:
runtime: ${{ fromJSON(needs.runtime-matrix.outputs.runtime) }}
name: ${{ matrix.runtime.name }}
steps:
- name: Checkout codes on ${{ github.ref }}
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run ${{ matrix.runtime.name }} try-runtime check
uses: paritytech/[email protected]
working-directory: ./parachain

Check failure on line 110 in .github/workflows/check-runtime-upgrade.yml

View workflow run for this annotation

GitHub Actions / Check runtime upgrade

Invalid workflow file

The workflow is not valid. .github/workflows/check-runtime-upgrade.yml (Line: 110, Col: 9): Unexpected value 'working-directory'
with:
runtime-package: ${{ matrix.runtime.package }}
node-uri: ${{ matrix.runtime.uri }}
checks: "all"
extra-args: ""