Minor fix battle contract (#499) #223
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: 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.6.2 | |
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: self-hosted | |
#container: | |
# image: ghcr.io/gear-foundation/dapps/ci-rust:latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Rust (Stable) | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
targets: wasm32-unknown-unknown | |
- 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 | |
# mandatory tasks | |
- 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 |