-
Notifications
You must be signed in to change notification settings - Fork 31
78 lines (76 loc) · 2.15 KB
/
build-and-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
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
name: Build and Test
on: push
env:
RUST_VERSION: 1.76.0
NIGHTLY_VERSION: nightly-2024-02-04
CARGO_VET_VERSION: 0.7.0
CARGO_VET_REPO: https://github.com/mozilla/cargo-vet
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ env.NIGHTLY_VERSION }}
override: true
components: rustfmt, clippy
- name: Check Formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Run Clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --features depth_16,depth_20,depth_30
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ env.RUST_VERSION }}
override: true
- name: Run Tests
uses: actions-rs/cargo@v1
with:
command: test
args: --features depth_16,depth_20,depth_30
# vet:
# name: Vet Dependencies
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@master
# - name: Install Rust
# uses: actions-rs/toolchain@v1
# with:
# profile: minimal
# toolchain: ${{ env.RUST_VERSION }}
# override: true
# - uses: actions-rs/cargo@v1
# with:
# command: build
# - uses: actions/cache@v3
# with:
# path: |
# ~/.cargo/registry/index/
# ~/.cargo/registry/cache/
# ~/.cargo/git/db/
# target/
# key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
# - name: Install cargo-vet
# run: cargo install cargo-vet --version ${{ env.CARGO_VET_VERSION }} --git ${{ env.CARGO_VET_REPO }}
# - name: Prune (If some import got updated)
# run: cargo vet prune
# - name: Invoke cargo-vet
# run: cargo vet