This repository has been archived by the owner on Oct 2, 2023. It is now read-only.
Add collection_id to emitted event #475
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, dev] | |
pull_request: | |
types: [opened, synchronize] | |
workflow_dispatch: | |
# Set an environment variable (that can be overriden) for the Docker Repo | |
env: | |
DOCKER_REPO: freeverseio/laos-ownership-node | |
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 | |
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 Docker images | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./local.Dockerfile | |
push: true | |
tags: ${{ env.DOCKER_REPO }}:${{ 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: check format | |
run: | | |
cargo 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 |