-
Notifications
You must be signed in to change notification settings - Fork 10
91 lines (78 loc) · 2.17 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: check
on:
push:
branches: [ master ]
pull_request:
branches:
- '**'
workflow_dispatch:
jobs:
# checks markdown links
link-check:
if: ${{ false }}
name: links
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- 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 build succeeds without warnings
cargo-check:
name: build
runs-on: ubuntu-latest
env:
RUSTFLAGS: -Dwarnings
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
- uses: hecrj/setup-rust-action@v1
- run: cargo check --workspace --verbose
# check compilation for wasm32-unknown-unknown
webassembly-check:
name: webassembly
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Rust Cache
uses: Swatinem/[email protected]
- name: Run Webassembly check
run: |
cargo check --target wasm32-unknown-unknown \
--features js \
--features num-bigint \
--no-default-features
# 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@v2
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
- name: Rust Cache
uses: Swatinem/[email protected]
- name: Run Linters
run: |
cargo fmt --all -- --check
cargo clippy -- -D warnings