From 4c1764a2e44fdd218e439e2536c89d62b668d069 Mon Sep 17 00:00:00 2001 From: Daniel Van Der Maden Date: Sat, 11 Jul 2020 02:49:16 -0700 Subject: [PATCH] [localnet] Add requirements.txt * Add install to Makefile * Update Dockerfile --- localnet/Dockerfile | 10 +++++----- localnet/Makefile | 6 +++++- localnet/requirements.txt | 3 +++ 3 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 localnet/requirements.txt diff --git a/localnet/Dockerfile b/localnet/Dockerfile index 9ec68bb..7ed3568 100644 --- a/localnet/Dockerfile +++ b/localnet/Dockerfile @@ -7,10 +7,6 @@ SHELL ["/bin/bash", "-c"] RUN apt update && apt upgrade -y && apt update -y && apt install \ libgmp-dev libssl-dev curl git jq make gcc g++ bash sudo python3 python3-pip -y -RUN python3 -m pip install pyhmy==20.5.16 - -RUN python3 -m pip install pytest==5.4.3 - RUN git clone https://github.com/harmony-one/harmony.git RUN git clone https://github.com/harmony-one/bls.git @@ -18,7 +14,7 @@ RUN git clone https://github.com/harmony-one/bls.git RUN git clone https://github.com/harmony-one/mcl.git # Build to fetch all dependencies for faster test builds -RUN cd harmony && make +RUN cd harmony && go get github.com/pborman/uuid && go get github.com/rjeczalik/notify && make RUN rm -rf harmony @@ -31,6 +27,10 @@ COPY tests tests COPY configs configs +COPY requirements.txt requirements.txt + +RUN python3 -m pip install -r requirements.txt && rm requirements.txt + RUN chmod +x $GOPATH/src/github.com/harmony-one/harmony-tests/localnet/scripts/run.sh ENTRYPOINT ["/go/src/github.com/harmony-one/harmony-tests/localnet/scripts/run.sh"] \ No newline at end of file diff --git a/localnet/Makefile b/localnet/Makefile index 22230ca..a233d8f 100644 --- a/localnet/Makefile +++ b/localnet/Makefile @@ -1,11 +1,15 @@ -.PHONY: build upload help +.PHONY: isntall build build-cached upload help help: + @echo "install - install dependencies for running tests without docker" @echo "build - build the docker image" @echo "build-cached - build the docker image with cache" @echo "upload - upload the docker image to dockerhub (require credentials)" @echo "test - run the localnet tests without docker" +install: + python3 -m pip install -r requirements.txt + build: docker build -t harmonyone/node-test . --no-cache diff --git a/localnet/requirements.txt b/localnet/requirements.txt new file mode 100644 index 0000000..4debc6d --- /dev/null +++ b/localnet/requirements.txt @@ -0,0 +1,3 @@ +pyhmy==20.5.16 +pytest==5.4.3 +pytest-ordering==0.6 \ No newline at end of file