Skip to content

Commit 794b904

Browse files
committed
add github actions workflow
1 parent 3ad9b6a commit 794b904

File tree

2 files changed

+57
-1
lines changed

2 files changed

+57
-1
lines changed

.github/workflows/ci.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: CI builds
2+
3+
on:
4+
push:
5+
branches: ["*"]
6+
7+
env:
8+
CARGO_INCREMENTAL: 0
9+
CARGO_TERM_COLOR: always
10+
RUSTC_WRAPPER: "sccache"
11+
RUSTFLAGS: "-Dwarnings"
12+
SCCACHE_GHA_ENABLED: "true"
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
23+
- name: Install rust toolchain
24+
uses: dtolnay/rust-toolchain@stable
25+
with:
26+
components: clippy
27+
28+
- uses: actions/cache@v4
29+
with:
30+
path: |
31+
~/.cargo/bin/
32+
~/.cargo/registry/index/
33+
~/.cargo/registry/cache/
34+
~/.cargo/git/db/
35+
target/
36+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
37+
38+
- name: Run sccache-cache
39+
uses: mozilla-actions/[email protected]
40+
41+
- name: Check formatting
42+
run: cargo fmt --all --check
43+
44+
- name: Run clippy
45+
run: cargo clippy --all-targets --all-features
46+
47+
- name: Install tooling
48+
uses: taiki-e/install-action@v2
49+
with:
50+
tool: cargo-machete
51+
52+
- name: Check for unused deps
53+
run: cargo machete --with-metadata
54+
55+
- name: Ensure it builds
56+
run: cargo build

crates/bacli/src/commands/scan.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ pub async fn scan(mut config: Config, args: ScanArgs) -> Result<()> {
5151
}
5252

5353
async fn check_ip(pool: reqwest::Client, ip: IpAddr) -> Result<(IpAddr, SystemInfo)> {
54-
let client = BitaxeClient::new_with_client(pool, &ip);
54+
let client = BitaxeClient::new_with_client(pool, ip);
5555
let info = client.system_info().await?;
5656

5757
Ok((ip, info))

0 commit comments

Comments
 (0)