miden-crypto/.github/workflows/lint.yml
.github/workflows/lint.ymlRaw
1# Runs linting related jobs.
2
3name: lint
4
5on:
6 push:
7 branches:
8 - main
9 pull_request:
10 types: [opened, reopened, synchronize]
11
12jobs:
13 version:
14 name: check rust version consistency
15 runs-on: ubuntu-latest
16 steps:
17 - uses: actions/checkout@v4
18 with:
19 profile: minimal
20 override: true
21 - name: check rust versions
22 run: ./scripts/check-rust-version.sh
23
24 rustfmt:
25 name: rustfmt ${{matrix.toolchain}} on ${{matrix.os}}
26 runs-on: ${{matrix.os}}-latest
27 strategy:
28 fail-fast: false
29 matrix:
30 toolchain: [nightly]
31 os: [ubuntu]
32 steps:
33 - uses: actions/checkout@v4
34 - name: Install minimal Rust with rustfmt
35 uses: actions-rs/toolchain@v1
36 with:
37 profile: minimal
38 toolchain: ${{matrix.toolchain}}
39 components: rustfmt
40 override: true
41 - uses: davidB/rust-cargo-make@v1
42 - name: cargo make - format-check
43 run: cargo make format-check
44
45 clippy:
46 name: clippy ${{matrix.toolchain}} on ${{matrix.os}}
47 runs-on: ${{matrix.os}}-latest
48 strategy:
49 fail-fast: false
50 matrix:
51 toolchain: [stable]
52 os: [ubuntu]
53 steps:
54 - uses: actions/checkout@v4
55 with:
56 submodules: recursive
57 - name: Install minimal Rust with clippy
58 uses: actions-rs/toolchain@v1
59 with:
60 profile: minimal
61 toolchain: ${{matrix.toolchain}}
62 components: clippy
63 override: true
64 - uses: davidB/rust-cargo-make@v1
65 - name: cargo make - clippy
66 run: cargo make clippy