Skip to content

Commit ef2ec36

Browse files
committed
chore: fix last clippy warning + add Docker build CI with Blacksmith
- Add Default impl for MockBackend (clippy::new_without_default) - Add Docker build job to ci.yml using Blacksmith for layer caching: - useblacksmith/setup-docker-builder@v1 - useblacksmith/build-push-action@v2 with GHA cache - Verifies binary with `docker run --rm warpgrid:ci --help`
1 parent 785598b commit ef2ec36

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,24 @@ jobs:
2727
- name: Test
2828
run: cargo test --all
2929

30+
docker:
31+
name: Docker Build
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v4
35+
- uses: useblacksmith/setup-docker-builder@v1
36+
- name: Build Docker image
37+
uses: useblacksmith/build-push-action@v2
38+
with:
39+
context: .
40+
file: infra/Dockerfile
41+
push: false
42+
tags: warpgrid:ci
43+
cache-from: type=gha
44+
cache-to: type=gha,mode=max
45+
- name: Verify binary works
46+
run: docker run --rm warpgrid:ci --help
47+
3048
wasi-libc:
3149
name: Build & Test wasi-libc
3250
runs-on: ubuntu-latest

crates/warpgrid-host/src/db_proxy/bench_utils.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ pub struct MockBackend {
2424
latency: Duration,
2525
}
2626

27+
impl Default for MockBackend {
28+
fn default() -> Self {
29+
Self::new()
30+
}
31+
}
32+
2733
impl MockBackend {
2834
/// Create a mock backend with zero latency.
2935
pub fn new() -> Self {

0 commit comments

Comments
 (0)