Skip to content

Commit 0c1dc8d

Browse files
authored
workflow: Add code checks. (#12)
1 parent 5c54d49 commit 0c1dc8d

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflows/code_checks.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Code Checks
2+
3+
on: [push]
4+
5+
env:
6+
CARGO_TERM_COLOR: always
7+
CARGO_TERM_VERBOSE: true
8+
CARGOFLAGS: --workspace --all-targets --all-features
9+
RUST_LOG: trace
10+
RISC0_DEV_MODE: 1
11+
12+
jobs:
13+
formatting:
14+
name: Check formatting
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Run Cargo fmt
20+
run: cargo fmt --check
21+
22+
linting:
23+
name: Check linting
24+
runs-on: ubuntu-latest
25+
26+
steps:
27+
- uses: actions/checkout@v4
28+
- name: Run Cargo clippy
29+
run: cargo clippy --no-deps --all-targets -- -Dwarnings
30+
31+
udeps:
32+
name: Check unused dependencies
33+
runs-on: ubuntu-latest
34+
35+
steps:
36+
- uses: actions/checkout@v4
37+
- name: Toolchain
38+
uses: actions-rs/toolchain@v1
39+
with:
40+
toolchain: nightly-2024-07-27
41+
override: true
42+
- name: Run cargo-udeps
43+
env:
44+
RUSTFLAGS: -A warnings
45+
uses: aig787/cargo-udeps-action@v1
46+
with:
47+
version: "latest"
48+
args: "--workspace --all-features --all-targets"

0 commit comments

Comments
 (0)