-
Notifications
You must be signed in to change notification settings - Fork 39
69 lines (52 loc) · 1.44 KB
/
rust.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
name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
typos:
name: Typos Check
runs-on: ubuntu-latest
steps:
- name: Clone this repository
uses: actions/checkout@v4
- name: Check spelling
uses: crate-ci/typos@master
build:
runs-on: ubuntu-latest
needs: typos
steps:
- name: Clone this repository
uses: actions/checkout@v4
- name: Rust Toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Update Stable Rust toolchain
run: rustup update stable
- name: Add Cargo fmt
run: rustup component add rustfmt
- name: Install latest cargo-deny1
uses: taiki-e/install-action@cargo-deny
- name: Run cargo fmt
run: cargo fmt --all -- --check
- name: Run cargo fmt
run: rustup component add clippy
- name: Clippy Code Check
run: cargo +stable clippy --all-targets --no-default-features -- --deny warnings
- name: Build
run: cargo build --verbose
test:
name: Run Tests
runs-on: ubuntu-latest
needs: build
steps:
- name: Clone this repository
uses: actions/checkout@v4
- name: Rust Toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Update Stable Rust toolchain
run: rustup update stable
- name: Run tests
run: TEST_INTEGRATION=true cargo test --verbose