-
Notifications
You must be signed in to change notification settings - Fork 17
52 lines (42 loc) · 1.02 KB
/
lint-rust.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
name: Lint Rust
permissions:
pull-requests: write
on:
push:
branches:
- main
paths:
- '.github/workflows/lint-rust.yml'
- 'src-tauri/**'
pull_request:
branches:
- main
paths:
- '.github/workflows/lint-rust.yml'
- 'src-tauri/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint-rust:
runs-on: macos-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
- name: Mock Files
run: |
mkdir -p elk/.output/public
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --manifest-path=Cargo.toml --all-targets --all-features -- -D warnings
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --manifest-path=Cargo.toml --all -- --check