Skip to content

Commit 14c3454

Browse files
authored
Add cargo deny to CI (#249)
* add cargo deny check to CI * cleanup * replace unmaintaned dotenv -> dotenvy * update yanked [email protected] * update yanked crossbeam-channel * ignore paste crate being unmaintained * allow multiple crate versions * allow paradigmxyz as source for GH deps * explicit version for reth dep * Update tokio Addresses RUSTSEC-2025-0023 * cleanup
1 parent 4c39b0f commit 14c3454

File tree

7 files changed

+86
-51
lines changed

7 files changed

+86
-51
lines changed

.github/workflows/lint.yml

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,35 @@
11
name: Linting
22

33
on:
4-
push:
5-
branches:
6-
- main
7-
pull_request:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
88

99
jobs:
10-
build:
11-
runs-on: ubuntu-latest
12-
13-
steps:
14-
- name: Checkout code
15-
uses: actions/checkout@v2
16-
17-
- name: Set up Rust
18-
uses: dtolnay/rust-toolchain@stable
19-
with:
20-
toolchain: stable
21-
override: true
22-
components: rustfmt
23-
24-
- name: Build
25-
run: cargo build --verbose
26-
27-
- name: Lint
28-
run: cargo clippy -- -D warnings
29-
30-
- name: Format code
31-
run: cargo fmt -- --check
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v2
16+
17+
- name: Set up Rust
18+
uses: dtolnay/rust-toolchain@stable
19+
with:
20+
toolchain: stable
21+
override: true
22+
components: rustfmt
23+
24+
- name: Build
25+
run: cargo build --workspace --verbose
26+
27+
- name: Lint
28+
run: cargo clippy --workspace -- -D warnings
29+
30+
- name: Format code
31+
run: cargo fmt --all -- --check
32+
33+
- name: Deny
34+
uses: EmbarkStudios/cargo-deny-action@v2
35+

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ jobs:
2020
- name: Install cargo-nextest
2121
uses: taiki-e/install-action@nextest
2222
- name: Run nextest
23-
run: cargo nextest run
23+
run: cargo nextest run --workspace

Cargo.lock

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ clap = { version = "4", features = ["derive", "env"] }
1717
jsonrpsee = { version = "0.24", features = ["server", "http-client", "macros"] }
1818
moka = { version = "0.12.10", features = ["future"] }
1919
http = "1.1.0"
20-
dotenv = "0.15.0"
20+
dotenvy = "0.15.7"
2121
tower = "0.4.13"
2222
tower-http = { version = "0.5.2", features = [
23-
"decompression-full",
24-
"sensitive-headers",
23+
"decompression-full",
24+
"sensitive-headers",
2525
] }
2626
http-body-util = "0.1.2"
2727
hyper = { version = "1.4.1", features = ["full"] }
@@ -31,11 +31,11 @@ rustls = { version = "0.23.23", features = ["ring"] }
3131
serde_json = "1.0.96"
3232
opentelemetry = { version = "0.28.0", features = ["trace"] }
3333
opentelemetry-otlp = { version = "0.28.0", features = [
34-
"http-proto",
35-
"http-json",
36-
"reqwest-client",
37-
"trace",
38-
"grpc-tonic",
34+
"http-proto",
35+
"http-json",
36+
"reqwest-client",
37+
"trace",
38+
"grpc-tonic",
3939
] }
4040
opentelemetry_sdk = { version = "0.28.0", features = ["rt-tokio"] }
4141
tracing-opentelemetry = "0.29.0"
@@ -59,7 +59,7 @@ assert_cmd = "2.0.10"
5959
predicates = "3.1.2"
6060
tokio-util = { version = "0.7.13" }
6161
bytes = "1.2"
62-
reth-rpc-layer = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.3.7" }
62+
reth-rpc-layer = { git = "https://github.com/paradigmxyz/reth.git", version = "1.3.7", rev = "v1.3.7" }
6363
ctor = "0.4.1"
6464
reqwest = "0.12.15"
6565

deny.toml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[licenses]
2+
allow = [
3+
"MIT",
4+
"Apache-2.0",
5+
"Apache-2.0 WITH LLVM-exception",
6+
"Unicode-3.0",
7+
"MPL-2.0",
8+
"ISC",
9+
"CC0-1.0",
10+
"BSD-3-Clause",
11+
"Zlib",
12+
"OpenSSL",
13+
]
14+
confidence-threshold = 0.8
15+
16+
[advisories]
17+
ignore = [
18+
# paste crate is unmaintained
19+
"RUSTSEC-2024-0436",
20+
]
21+
22+
[bans]
23+
multiple-versions = "allow"
24+
wildcards = "warn"
25+
highlight = "all"
26+
27+
[sources]
28+
unknown-registry = "warn"
29+
unknown-git = "warn"
30+
allow-registry = ["https://github.com/rust-lang/crates.io-index"]
31+
allow-git = []
32+
33+
[sources.allow-org]
34+
github = ["paradigmxyz"]

src/bin/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use clap::Parser;
22
use rollup_boost::Args;
33

4-
use dotenv::dotenv;
4+
use dotenvy::dotenv;
55

66
#[tokio::main]
77
async fn main() -> eyre::Result<()> {

src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
2-
use dotenv as _;
3-
41
mod client;
52
pub use client::{auth::*, http::*, rpc::*};
63

0 commit comments

Comments
 (0)