-
Notifications
You must be signed in to change notification settings - Fork 13
58 lines (49 loc) · 1.43 KB
/
lints.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
on:
pull_request:
branches:
- develop
name: Lints
env:
DEV_PACKAGES: build-essential musl musl-dev musl-tools libssl-dev pkg-config
jobs:
clippy:
name: Clippy
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-clippy
cancel-in-progress: true
runs-on: ubuntu-latest
steps:
- name: install system build dependencies
run: sudo apt-get update && sudo apt-get install ${DEV_PACKAGES}
- name: Checkout sources
uses: actions/checkout@v2
- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
shared-key: "rust"
cache-directories: ".dvc/tmp\n.dvc/cache"
- name: Install stable toolchain with clippy available
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: clippy
- name: Run cargo clippy
run: ./ci/clippy.sh
continue-on-error: false
rustfmt:
name: Format
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-rustfmt
cancel-in-progress: true
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install stable toolchain with rustfmt available
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt
- name: Run cargo fmt
run: cargo fmt --all -- --check
continue-on-error: false