Skip to content

Commit

Permalink
reduce tests image size and build time (#14519)
Browse files Browse the repository at this point in the history
* reduce tests image size and reduce re-build time

* address suggestions

* resolve conflict
  • Loading branch information
anirudhwarrier authored Sep 25, 2024
1 parent 8b37da5 commit 3480f98
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions integration-tests/test.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,26 @@ ARG BASE_IMAGE
ARG IMAGE_VERSION=latest
FROM ${BASE_IMAGE}:${IMAGE_VERSION} AS build-env

ARG SUITES=chaos migration performance reorg smoke soak benchmark load ccip-load

COPY . testdir/
WORKDIR /go/testdir
RUN mkdir -p /go/testdir/integration-tests/load
COPY go.mod go.sum ./
COPY integration-tests/go.mod integration-tests/go.sum ./integration-tests/
COPY integration-tests/load/go.mod integration-tests/load/go.sum ./integration-tests/load/
RUN cd integration-tests && go mod download
RUN cd integration-tests/load && go mod download

COPY . .

ARG SUITES=chaos soak benchmark load ccip-load

RUN /go/testdir/integration-tests/scripts/buildTests "${SUITES}"

FROM ${BASE_IMAGE}:${IMAGE_VERSION}

RUN mkdir -p /go/testdir/integration-tests/scripts
COPY --from=build-env /go/pkg /go/pkg
# Dependency of CosmWasm/wasmd
COPY --from=build-env /go/pkg/mod/github.com/\!cosm\!wasm/wasmvm@v*/internal/api/libwasmvm.*.so /usr/lib/
RUN chmod 755 /usr/lib/libwasmvm.*.so
COPY --from=build-env /go/testdir/integration-tests/*.test /go/testdir/integration-tests/
COPY --from=build-env /go/testdir/integration-tests/ccip-tests/*.test /go/testdir/integration-tests/
COPY --from=build-env /go/testdir/integration-tests/scripts /go/testdir/integration-tests/scripts/
Expand Down

0 comments on commit 3480f98

Please sign in to comment.