-
Notifications
You must be signed in to change notification settings - Fork 10
42 lines (36 loc) · 1.15 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: CI
on: [pull_request]
jobs:
rust-checks:
runs-on: ubuntu-latest
strategy:
matrix:
ref-impl: [ ICRC-21 ]
steps:
- uses: actions/checkout@v4
- name: Install Rust
id: install-rust
run: |
rustup update stable --no-self-update
rustup component add rustfmt
rustup component add clippy
echo "cargo-version=$(cargo version)" >> $GITHUB_OUTPUT
- name: Cache Cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ matrix.ref-impl }}-${{ steps.install-rust.outputs.cargo-version }}-${{ hashFiles('**/Cargo.lock') }}
- name: Check Format
working-directory: reference-implementations/${{ matrix.ref-impl }}
run: cargo fmt --check
- name: Clippy
working-directory: reference-implementations/${{ matrix.ref-impl }}
run: cargo clippy --tests --benches -- -D clippy::all
- name: Test
working-directory: reference-implementations/${{ matrix.ref-impl }}
run: cargo test
env:
RUST_BACKTRACE: 1