From 38c4a8593a1a5dde79d1d097cc7673fbd03026c0 Mon Sep 17 00:00:00 2001 From: jon r Date: Tue, 28 Mar 2023 19:04:24 +0200 Subject: [PATCH 1/4] chore: lint --- src/bin/server.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/server.rs b/src/bin/server.rs index f18b9b3..089f0ac 100644 --- a/src/bin/server.rs +++ b/src/bin/server.rs @@ -11,13 +11,13 @@ fn main() { .nth(2) .unwrap_or_else(|| "10".to_string()) .parse::() - .unwrap();; + .unwrap(); let thread_count = env::args() .nth(3) .unwrap_or_else(|| "4".to_string()) .parse::() - .unwrap();; + .unwrap(); server::start_server(&listen_at, queue_size, thread_count); } From f55ef54d9913689f66e07a5b34152c75258b3ac4 Mon Sep 17 00:00:00 2001 From: jon r Date: Tue, 28 Mar 2023 19:05:14 +0200 Subject: [PATCH 2/4] chore: fmt --- src/bin/server.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/server.rs b/src/bin/server.rs index 089f0ac..6b0b2ec 100644 --- a/src/bin/server.rs +++ b/src/bin/server.rs @@ -7,13 +7,13 @@ fn main() { .nth(1) .unwrap_or_else(|| "127.0.0.1:8080".to_string()); - let queue_size = env::args() + let queue_size = env::args() .nth(2) .unwrap_or_else(|| "10".to_string()) .parse::() .unwrap(); - let thread_count = env::args() + let thread_count = env::args() .nth(3) .unwrap_or_else(|| "4".to_string()) .parse::() From a0db77996db8516afa5a79a952e7e94b25624d09 Mon Sep 17 00:00:00 2001 From: jon r Date: Tue, 28 Mar 2023 19:10:58 +0200 Subject: [PATCH 3/4] feat(workflow/test): Format and Lint before Build and Test --- .github/workflows/test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e64dce5..6863f0b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,13 +27,13 @@ jobs: run: echo ~/.foundry/bin/ >> $GITHUB_PATH - name: Install Dependencies run: curl -L https://foundry.paradigm.xyz | bash && foundryup + - name: Format + run: cargo fmt --check --verbose + - name: Lint + run: cargo clippy --all --all-features -- -D warnings - name: Build run: cargo build --verbose - name: Download safes run: wget -q -c https://rpc.circlesubi.id/pathfinder-db/capacity_graph.db - name: Run tests run: cargo test --verbose - - name: Lint - run: cargo clippy --all --all-features -- -D warnings - - name: Format - run: cargo fmt --check --verbose From 73cbdae59687fe18c19cce29fcb22e8e41a82643 Mon Sep 17 00:00:00 2001 From: jon r Date: Tue, 28 Mar 2023 19:11:27 +0200 Subject: [PATCH 4/4] chore(gitignore): add capacity_graph.db --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 088ba6b..35ae214 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,6 @@ Cargo.lock # These are backup files generated by rustfmt **/*.rs.bk + +# Capacity graph runtime state +capacity_graph.db