Skip to content

Commit 83fd63f

Browse files
author
Rahul Patni
committed
ci setup
1 parent dd72103 commit 83fd63f

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed

.github/workflows/rust_ci.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
on:
2+
pull_request:
3+
push:
4+
branches:
5+
- master
6+
7+
name: Rust CI
8+
9+
jobs:
10+
rust_lint:
11+
name: Lint Rust
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Cache Rust
17+
uses: Swatinem/rust-cache@v2
18+
with:
19+
save-if: false
20+
shared-key: base
21+
22+
- name: "`cargo fmt` check on ironfish-rust"
23+
run: |
24+
cargo fmt --all -- --check
25+
26+
- name: "Clippy check on ironfish-rust"
27+
run: |
28+
cargo clippy --all-targets --all-features -- -D warnings
29+
30+
cargo_check:
31+
name: Check Rust
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v4
35+
36+
- name: Cache Rust
37+
uses: Swatinem/rust-cache@v2
38+
with:
39+
save-if: false
40+
shared-key: base
41+
42+
- name: Install cargo-all-features
43+
run: |
44+
cargo install --locked cargo-all-features
45+
46+
- name: Check that cargo lockfile is up to date
47+
run: |
48+
cargo check-all-features --locked --all-targets
49+
50+
cargo_vet:
51+
name: Vet Dependencies
52+
runs-on: ubuntu-latest
53+
steps:
54+
- uses: actions/checkout@v4
55+
56+
- name: Cache Rust
57+
uses: Swatinem/rust-cache@v2
58+
with:
59+
save-if: false
60+
shared-key: base
61+
62+
- name: Install cargo-vet
63+
run: |
64+
cargo install --locked cargo-vet
65+
66+
- name: Vet dependencies
67+
run: |
68+
cargo vet

0 commit comments

Comments
 (0)