File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : PR Checks
2+
3+ on :
4+ pull_request :
5+
6+ jobs :
7+ validate-and-test :
8+ runs-on : ubuntu-latest
9+
10+ steps :
11+ - name : Checkout
12+ uses : actions/checkout@v4
13+
14+ - name : Set up Rust
15+ uses : dtolnay/rust-toolchain@stable
16+ with :
17+ toolchain : " 1.88.0"
18+ components : rustfmt, clippy
19+
20+ - name : Rust cache
21+ uses : Swatinem/rust-cache@v2
22+
23+ - name : Format check
24+ run : cargo fmt --all --check
25+
26+ - name : Lint
27+ run : cargo clippy --workspace --all-targets
28+
29+ - name : Tests
30+ run : cargo test --workspace --all-targets --locked
31+
32+ docker-build-verify :
33+ runs-on : ubuntu-latest
34+
35+ steps :
36+ - name : Checkout
37+ uses : actions/checkout@v4
38+
39+ - name : Set up QEMU
40+ uses : docker/setup-qemu-action@v3
41+
42+ - name : Set up Docker Buildx
43+ uses : docker/setup-buildx-action@v3
44+
45+ - name : Verify multi-arch Docker build
46+ uses : docker/build-push-action@v6
47+ with :
48+ context : .
49+ file : hulykvs_server/Dockerfile
50+ push : false
51+ platforms : linux/amd64,linux/arm64
Original file line number Diff line number Diff line change 1- FROM --platform=$BUILDPLATFORM rust:1.86 AS builder
1+ FROM --platform=$BUILDPLATFORM rust:1.88 AS builder
22ARG TARGETPLATFORM
33
44WORKDIR /tmp/build
Original file line number Diff line number Diff line change @@ -147,14 +147,18 @@ async fn main() -> anyhow::Result<()> {
147147 info ! ( ?backend, "detected database backend" ) ;
148148
149149 let report = match backend {
150- DbBackend :: Cockroach => migrations_crdb:: migrations:: runner ( )
151- . set_migration_table_name ( "migrations" )
152- . run_async ( & mut connection)
153- . await ?,
154- DbBackend :: Postgres => migrations_pg:: migrations:: runner ( )
155- . set_migration_table_name ( "migrations_pg" )
156- . run_async ( & mut connection)
157- . await ?,
150+ DbBackend :: Cockroach => {
151+ migrations_crdb:: migrations:: runner ( )
152+ . set_migration_table_name ( "migrations" )
153+ . run_async ( & mut connection)
154+ . await ?
155+ }
156+ DbBackend :: Postgres => {
157+ migrations_pg:: migrations:: runner ( )
158+ . set_migration_table_name ( "migrations_pg" )
159+ . run_async ( & mut connection)
160+ . await ?
161+ }
158162 } ;
159163
160164 for m in report. applied_migrations ( ) . iter ( ) {
You can’t perform that action at this time.
0 commit comments