-
Notifications
You must be signed in to change notification settings - Fork 1
76 lines (63 loc) · 2.01 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Lint
on:
workflow_call:
inputs:
cache-key:
required: true
type: string
workflow_dispatch:
env:
CARGO_CACHE_KEY: ${{ inputs.cache-key || 'default-cache-key-if-none-provided' }}
jobs:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@6d193bf28034eafb982f37bd894289fe649468fc # v4.1.7
- uses: actions/cache@81382a721fc89d96eca335d0c3ba33144b2baa9d # v4.0.2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
~/.cargo/bin
key: ${{ env.CARGO_CACHE_KEY }}
id: cache-cargo-fmt
- uses: actions-rust-lang/setup-rust-toolchain@1fbea72663f6d4c03efaab13560c8a24cfd2a7cc # v1.9.0
with:
components: rustfmt
- name: Rustfmt Check
uses: actions-rust-lang/rustfmt@v1
deny:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@6d193bf28034eafb982f37bd894289fe649468fc # v4.1.7
- uses: actions/cache@81382a721fc89d96eca335d0c3ba33144b2baa9d # v4.0.2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
~/.cargo/bin
key: ${{ env.CARGO_CACHE_KEY }}
id: cache-cargo-deny
- uses: actions-rust-lang/setup-rust-toolchain@1fbea72663f6d4c03efaab13560c8a24cfd2a7cc # v1.9.0
- uses: EmbarkStudios/cargo-deny-action@v1
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@6d193bf28034eafb982f37bd894289fe649468fc # v4.1.7
- uses: actions/cache@81382a721fc89d96eca335d0c3ba33144b2baa9d # v4.0.2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
~/.cargo/bin
key: ${{ env.CARGO_CACHE_KEY }}
id: cache-cargo-fmt
- uses: actions-rust-lang/setup-rust-toolchain@1fbea72663f6d4c03efaab13560c8a24cfd2a7cc # v1.9.0
- uses: taiki-e/install-action@v2
with:
tool: cargo-audit
- name: Cargo audit
run: cargo audit