Migrations for unified accounts switch #101
Workflow file for this run
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 | |
# Controls when the action will run. | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
types: [opened, synchronize] | |
workflow_dispatch: | |
jobs: | |
check: | |
if: github.event_name == 'pull_request' | |
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: | | |
SKIP_WASM_BUILD=1 cargo check --release --features runtime-benchmarks --features try-runtime | |
build_and_push: | |
if: github.event_name == '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 | |
- name: Log in to Docker Hub | |
uses: docker/[email protected] | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_TOKEN }} | |
- name: Push Ownership Node Docker images | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./docker/ownership-node.local.Dockerfile | |
push: true | |
tags: freeverseio/laos-ownership-node:${{ github.sha }} | |
- name: Push Evolution Node Docker images | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./docker/evolution-node.local.Dockerfile | |
push: true | |
tags: freeverseio/laos-evolution-node:${{ github.sha }} | |
- name: Push Bridge Docker images | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./docker/bridge.local.Dockerfile | |
push: true | |
tags: freeverseio/laos-bridge:${{ 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: | | |
cargo clippy --all-targets --workspace --features runtime-benchmarks --features try-runtime | |
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 | |
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 --package laos-ownership --features=try-runtime | |
- name: Try Runtime | |
run: | | |
RUST_LOG=try-runtime ./target/release/laos-ownership try-runtime --runtime ./target/release/wbuild/laos-ownership-runtime/laos_ownership_runtime.wasm on-runtime-upgrade --checks=pre-and-post live --uri ws://143.198.251.52:9944 |