-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a docker image for integration tests (#59)
* Add a docker image for integration tests * Docker - pre-download dependencies + increase timeout for libp2p topic subscription info exchange
- Loading branch information
Showing
2 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
FROM --platform=linux/amd64 ubuntu:latest | ||
|
||
WORKDIR /app/node | ||
|
||
## copy source files | ||
COPY . . | ||
|
||
# curl, unzip other utilities | ||
RUN apt-get update && \ | ||
apt-get install --no-install-recommends --assume-yes curl unzip pv ca-certificates gnupg2 build-essential | ||
|
||
# install go | ||
RUN curl -o go1.18.3.linux-amd64.tar.gz -sSL https://go.dev/dl/go1.18.3.linux-amd64.tar.gz | ||
RUN rm -rf /usr/local/go && tar -C /usr/local -xzf go1.18.3.linux-amd64.tar.gz | ||
ENV PATH=$PATH:/usr/local/go/bin | ||
|
||
# get the runtime | ||
RUN curl -o ./runtime.tar.gz -sSL https://github.com/blocklessnetwork/runtime/releases/download/v0.0.12/blockless-runtime.linux-latest.x86_64.tar.gz | ||
RUN mkdir /app/runtime && tar -xvkf ./runtime.tar.gz -C /app/runtime | ||
|
||
|
||
# specify where runtime is installed | ||
ENV B7S_INTEG_RUNTIME_DIR=/app/runtime | ||
|
||
# download dependencies | ||
RUN go get ./... | ||
|
||
# run the tests | ||
CMD [ "go", "test", "--tags=integration", "-v", "./..." ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters