Skip to content

fix: avoid panic when migrate param for newly added host #2540

fix: avoid panic when migrate param for newly added host

fix: avoid panic when migrate param for newly added host #2540

Workflow file for this run

name: Wasm Light-Client
# This workflow runs when a PR is opened that targets code that is part of the wasm light-client.
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v5
with:
go-version: '1.21'
- uses: actions/checkout@v4
- uses: golangci/[email protected]
with:
version: v1.57.2
args: --timeout 10m
working-directory: modules/light-clients/08-wasm
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-arch: ['amd64', 'arm64']
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v5
with:
go-version: '1.21'
# Install cross compiler for ARM64. Export CC env variable.
- name: Install compiler for arm64.
run: |
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu
echo "CC=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
if: matrix.go-arch == 'arm64'
- name: Build wasm-client
run: |
cd modules/light-clients/08-wasm
GOARCH=${{ matrix.go-arch }} CGO_ENABLED=1 go build ./...
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Go Test
run: |
cd modules/light-clients/08-wasm
go test -v -mod=readonly ./...
code-analysis:
if: github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- name: sonarcloud
if: ${{ env.GIT_DIFF && !github.event.pull_request.draft && env.SONAR_TOKEN != null }}
uses: SonarSource/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
projectBaseDir: modules/light-clients/08-wasm/