[localnet] Add requirements.txt

* Add install to Makefile
* Update Dockerfile
rosetta
Daniel Van Der Maden 4 years ago
parent 099c02a8d3
commit 4c1764a2e4
  1. 10
      localnet/Dockerfile
  2. 6
      localnet/Makefile
  3. 3
      localnet/requirements.txt

@ -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"]

@ -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

@ -0,0 +1,3 @@
pyhmy==20.5.16
pytest==5.4.3
pytest-ordering==0.6
Loading…
Cancel
Save