update pallet #3402
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
check: | |
runs-on: | |
group: laos | |
labels: ubuntu-16-cores | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/setup | |
- uses: ./.github/actions/cache | |
with: | |
cache-key: build_and_push | |
- name: Check | |
run: | | |
cargo check --all-targets --release --features runtime-benchmarks --features try-runtime | |
build_and_push: | |
runs-on: | |
group: laos | |
labels: ubuntu-16-cores | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/setup | |
- uses: ./.github/actions/cache | |
with: | |
cache-key: build_and_push | |
- name: Build | |
run: | | |
cargo build --release --locked | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v2.1.0 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_TOKEN }} | |
- name: Push Laos Node Docker images | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./docker/laos-node.local.Dockerfile | |
push: true | |
tags: freeverseio/laos-node:${{ github.sha }} | |
lint: | |
runs-on: | |
group: laos | |
labels: ubuntu-16-cores | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/setup | |
- uses: ./.github/actions/cache | |
with: | |
cache-key: lint | |
- name: install nightly | |
run: | | |
rustup toolchain install nightly | |
rustup component add rustfmt --toolchain nightly-x86_64-unknown-linux-gnu | |
- name: check format | |
run: | | |
cargo +nightly fmt --all --check | |
- name: install clippy | |
run: | | |
rustup component add clippy | |
- name: Check clippy | |
run: | | |
SKIP_WASM_BUILD=1 cargo clippy --all-targets --workspace --features runtime-benchmarks --features try-runtime -- -D warnings | |
lint-e2e: | |
runs-on: | |
group: laos | |
labels: ubuntu-16-cores | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js 18 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install dependencies | |
run: | | |
npm install | |
working-directory: ./e2e-tests | |
- name: Run lint | |
run: | | |
npm run fmt-check | |
working-directory: ./e2e-tests | |
test: | |
runs-on: | |
group: laos | |
labels: ubuntu-16-cores | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/setup | |
- uses: ./.github/actions/cache | |
with: | |
cache-key: test | |
- name: Test | |
run: | | |
SKIP_WASM_BUILD=1 cargo test --locked | |
try-runtime: | |
runs-on: | |
group: laos | |
labels: ubuntu-16-cores | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/setup | |
- uses: ./.github/actions/cache | |
with: | |
cache-key: try_runtime | |
- name: Build | |
run: | | |
cargo build --release --locked --package laos --features=try-runtime | |
- name: Download try-runtime-cli binary | |
run: | | |
curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/v0.7.0/try-runtime-x86_64-unknown-linux-musl -o try-runtime | |
chmod +x ./try-runtime | |
- name: Try Runtime for Laos Sigma | |
run: | | |
RUST_LOG=try-runtime,info ./try-runtime --runtime ./target/release/wbuild/laos-runtime/laos_runtime.wasm on-runtime-upgrade --disable-spec-version-check --checks=all live --uri ws://159.223.241.51:9944 | |
- name: Try Runtime for Laos | |
run: | | |
RUST_LOG=try-runtime,info ./try-runtime --runtime ./target/release/wbuild/laos-runtime/laos_runtime.wasm on-runtime-upgrade --disable-spec-version-check --checks=all live --uri wss://rpc.laos.laosfoundation.io |