Skip to content

Adding sails DEX

Adding sails DEX #300

name: Contracts CI - Tests
on:
pull_request:
branches: [master, main]
paths:
- contracts/**
push:
branches: [master, main]
paths:
- contracts/**
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
GEAR_VERSION: 1.7.0
defaults:
run:
working-directory: contracts
permissions:
contents: write
id-token: write
pages: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
all:
name: Tests
runs-on: kuberunner
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Rust (Stable)
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: wasm32-unknown-unknown
profile: minimal
components: rustfmt, clippy
- name: Set up Rust (Nightly)
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
components: rustfmt
profile: minimal
- name: Install rust-src component
run: rustup component add rust-src --toolchain stable-x86_64-unknown-linux-gnu
- name: Prepare Gear Binary
run: |
mkdir -p target/tmp
wget -qO- https://get.gear.rs/gear-v${{ env.GEAR_VERSION }}-x86_64-unknown-linux-gnu.tar.xz | tar xJ -C target/tmp
- name: Fmt
run: cargo +nightly fmt --all -- --config imports_granularity=Crate,edition=2021
- name: Clippy
run: cargo clippy --release --workspace --all-targets --all-features -- -D warnings
- name: Test
run: cargo test --release --workspace