Skip to content

Add CI workflow for rust #1

Add CI workflow for rust

Add CI workflow for rust #1

Workflow file for this run

name: CI
on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
ref-impl: [ ICRC-21 ]
steps:
- uses: actions/checkout@v4
- run: cd reference-implementation/${{ matrix.ref-impl }}
- name: Cache Cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ matrix.ref-impl }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install Rust
run: |
rustup update stable --no-self-update
rustup component add rustfmt
rustup component add clippy
- name: Check Format
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --tests --benches -- -D clippy::all
- name: Test
run: cargo test
env:
RUST_BACKTRACE: 1