Copy over migrations folder into container
All checks were successful
Podman Rootless Demo / test-backend (push) Successful in 9m10s
Podman Rootless Demo / test-frontend (push) Successful in 12s
Podman Rootless Demo / build-backend (push) Successful in 5m21s
Podman Rootless Demo / build-frontend (push) Successful in 2m21s
Podman Rootless Demo / deploy-prod (push) Successful in 36s
All checks were successful
Podman Rootless Demo / test-backend (push) Successful in 9m10s
Podman Rootless Demo / test-frontend (push) Successful in 12s
Podman Rootless Demo / build-backend (push) Successful in 5m21s
Podman Rootless Demo / build-frontend (push) Successful in 2m21s
Podman Rootless Demo / deploy-prod (push) Successful in 36s
This commit is contained in:
parent
9506b4b09c
commit
1c542bfca7
1 changed files with 3 additions and 0 deletions
|
|
@ -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"]
|
||||
Loading…
Add table
Reference in a new issue