From 7dd8bce1edf22b1dd62277d9da15e43cb7e74109 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Sun, 25 Jun 2023 16:09:05 -0700 Subject: [PATCH] do test and release building in parallel --- Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 12a82136..97f288fc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -53,11 +53,15 @@ COPY . . ENV WEB3_PROXY_FEATURES "rdkafka-src,connectinfo" +FROM builder as build_tests + # test the application with cargo-nextest RUN --mount=type=cache,target=/usr/local/cargo/registry \ --mount=type=cache,target=/app/target \ RUST_LOG=web3_proxy=trace,info cargo nextest run --features "$WEB3_PROXY_FEATURES" --no-default-features +FROM builder as build_app + # build the application # using a "release" profile (which install does by default) is **very** important # TODO: use the "faster_release" profile which builds with `codegen-units = 1` @@ -89,7 +93,7 @@ CMD [ "--config", "/web3-proxy.toml", "proxyd" ] # TODO: lower log level when done with prototyping ENV RUST_LOG "warn,ethers_providers::rpc=off,web3_proxy=debug,web3_proxy::rpcs::consensus=info,web3_proxy_cli=debug" -COPY --from=builder /usr/local/bin/* /usr/local/bin/ +COPY --from=build_app /usr/local/bin/* /usr/local/bin/ # make sure the app works RUN web3_proxy_cli --help