-
Notifications
You must be signed in to change notification settings - Fork 17
51 lines (41 loc) · 1.04 KB
/
test.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
name: Rust checks
on:
pull_request:
branches: [main]
push:
branches: [main]
env:
CARGO_TERM_COLOR: always
jobs:
check-format-and-lint:
name: Check & Lint
runs-on: ubuntu-22.04-8core
steps:
- uses: actions/checkout@v2
- name: Install Rust toolchain
run: |
rustup update stable
rustup default stable
rustup component add rustfmt clippy
- name: Check code formatting
run: cargo fmt --all -- --check
- name: Lint with clippy
run: cargo clippy -- -D warnings
cargo-check:
name: Cargo Check
runs-on: ubuntu-22.04-8core
steps:
- uses: actions/checkout@v2
- name: Install Rust toolchain
run: |
rustup update stable
rustup default stable
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Cargo Check
run: cargo check --all