-
Notifications
You must be signed in to change notification settings - Fork 15
50 lines (42 loc) · 1.18 KB
/
checks.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
name: checks
on:
push:
branches: [master]
pull_request:
workflow_dispatch:
env:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: git
jobs:
# checks markdown links
link-check:
name: links
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check markdown links
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
use-quiet-mode: "yes"
config-file: ".github/workflows/mlc_config.json"
# ensures proper formatting and clippy lint
lint-check:
name: lint
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v3
- name: Install latest nightly
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly
components: rustfmt, clippy
- name: Rust Cache
uses: Swatinem/[email protected]
- name: Run Linters
run: |
sudo apt-get install protobuf-compiler &&
cargo fmt --all -- --check &&
cargo clippy -Zunstable-options -- -D warnings -D clippy::unwrap_used