Skip to content

Contracts CI - Build #1329

Contracts CI - Build

Contracts CI - Build #1329

Workflow file for this run

name: Contracts CI - Tests
on:
workflow_dispatch:
pull_request:
paths-ignore:
- 'contracts/**'
- 'docker/**'
push:
paths-ignore:
- 'contracts/**'
- 'docker/**'
branches: [master]
env:
CARGO_TERM_COLOR: always
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:1.78.0
steps:
- name: Checkout
uses: actions/checkout@v4
# mandatory tasks
- name: Fmt
run: 'cargo +nightly fmt --all -- --config imports_granularity=Crate,edition=2021'
- name: Clippy
run: 'cargo +nightly clippy --release --workspace --all-targets --all-features — -D warnings'
# Only on push to master
- name: On Push to master
if: github.ref != 'refs/heads/master'
run: |
cargo test --release --workspace
cargo test --workspace
# Only on push to PR
- name: On Push to Pull Request
if: github.ref != 'refs/heads/master'
run: cargo test --release --workspace