-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (34 loc) · 1015 Bytes
/
lint.yml
File metadata and controls
40 lines (34 loc) · 1015 Bytes
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
name: Lint
on: [push]
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Auto-cancel redundant jobs
uses: technote-space/auto-cancel-redundant-job@v1
- name: Checkout the repo
uses: actions/checkout@v2
with:
submodules: true
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1.0.7
with:
toolchain: nightly
override: true
components: rustfmt, clippy
- name: Format
uses: actions-rs/cargo@v1
with:
command: fmt
- name: Check if there are changes in formatting
id: changes
uses: UnicornGlobal/has-changes-action@v1.0.12
- name: Fail if formatting is off
if: steps.changes.outputs.changed == 1
run: exit 1
- name: Clippy checks
uses: actions-rs/clippy-check@v1
if: ${{ !contains(github.ref, 'dependabot') }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features