From 1c542bfca7e8aff661bc0a523cbbc6d60c1ab6e4 Mon Sep 17 00:00:00 2001 From: continuist Date: Sun, 21 Sep 2025 12:23:50 -0400 Subject: [PATCH] Copy over migrations folder into container --- backend/Dockerfile.test-rust | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/Dockerfile.test-rust b/backend/Dockerfile.test-rust index f17da91..b8cebbc 100644 --- a/backend/Dockerfile.test-rust +++ b/backend/Dockerfile.test-rust @@ -7,6 +7,7 @@ FROM base AS planner RUN apt-get update && apt-get install -y --no-install-recommends pkg-config libssl-dev ca-certificates && rm -rf /var/lib/apt/lists/* RUN cargo install --locked cargo-chef COPY . . +COPY migrations /app/migrations RUN cargo chef prepare --recipe-path recipe.json # Deps: compile only external crates @@ -24,6 +25,7 @@ COPY --from=deps /usr/local/rustup /usr/local/rustup # Copy only release artifacts to save space COPY --from=deps /app/target/release /app/target/release COPY . . +COPY --from=planner /app/migrations /app/migrations # Clean up incremental compilation artifacts before test build RUN rm -rf /app/target/debug/incremental RUN cargo test --workspace --locked --no-run @@ -37,5 +39,6 @@ COPY --from=test-build /app/target /app/target COPY --from=test-build /app/Cargo.toml /app/Cargo.toml COPY --from=test-build /app/Cargo.lock /app/Cargo.lock COPY --from=test-build /app/crates /app/crates +COPY --from=test-build /app/migrations /app/migrations WORKDIR /app CMD ["cargo", "test", "--workspace", "--locked", "--", "--test-threads=1"] \ No newline at end of file