-
Notifications
You must be signed in to change notification settings - Fork 13
56 lines (53 loc) · 1.32 KB
/
lint.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
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Lint
on:
workflow_dispatch:
pull_request:
paths:
- "**.rs"
push:
branches:
- main
- "release/*"
paths:
- "**.rs"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: rust lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Make free space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Install latest rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.80.1
override: true
components: rustfmt, clippy
- uses: actions/setup-go@v4
with:
go-version: '1.22'
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
crates/move-test/build/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Rustfmt
run: |
cargo fmt --all
- name: Clippy
run: |
cargo clippy --all --all-targets -- -D warnings