Skip to content

Commit

Permalink
reduce tests image size and reduce re-build time
Browse files Browse the repository at this point in the history
  • Loading branch information
anirudhwarrier committed Sep 23, 2024
1 parent 359feff commit 950aaf7
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

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 950aaf7

Please sign in to comment.