-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (38 loc) · 1.03 KB
/
ci-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
name: Linter
on:
push:
branches:
- master
pull_request:
env:
CARGO_TERM_COLOR: always
RUST_TOOLCHAIN: "1.66.1"
defaults:
run:
working-directory: ./
jobs:
lint:
name: Linter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install stable Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: clippy
cache: true
- name: Install nightly Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly
components: rustfmt
cache: true
- name: Set default Rust toolchain
run: |
rustup show
rustup override set ${{ env.RUST_TOOLCHAIN }}
- name: Run fmt
run: cargo +nightly fmt -- --check
- name: Run clippy
run: cargo clippy --all-targets --all-features --workspace -- -D warnings --allow=clippy::result_large_err --allow=clippy::await_holding_refcell_ref