From e3dfcbb7b0b480dfc4a199aa92bc0bba796da24f Mon Sep 17 00:00:00 2001 From: Izel Nakri Date: Wed, 4 Mar 2020 04:57:51 +0100 Subject: [PATCH] Dockerized CI fix --- .dockerignore | 3 ++- Dockerfile | 4 ++-- test/support/eth_client.exs | 5 +---- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.dockerignore b/.dockerignore index e35d885..3634b9d 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1 +1,2 @@ -_build +_build/ +node_modules/ diff --git a/Dockerfile b/Dockerfile index 155a62e..864d3a0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,14 +5,14 @@ ENV MIX_ENV=$MIX_ENV WORKDIR /code -RUN apt-get update && apt-get -y install procps autoconf libtool libgmp3-dev git curl make build-essential && \ +RUN apt-get update && apt-get -y install python procps autoconf libtool libgmp3-dev git curl make build-essential && \ curl https://get.volta.sh | bash ENV PATH=$PATH:/root/.volta/bin RUN volta install node@8.17 -ADD ["package.json", "package-lock.json"] +ADD ["package.json", "package-lock.json", "/code/"] RUN npm install diff --git a/test/support/eth_client.exs b/test/support/eth_client.exs index 5891767..eb6af1d 100644 --- a/test/support/eth_client.exs +++ b/test/support/eth_client.exs @@ -10,10 +10,8 @@ defmodule ETH.TestClient do # this makes the process hang, maybe with elixir ports we can intercept? end) - wait_until_the_port_is_open() + wait_until_the_port_is_open() # NOTE: since couldnt find a way to intercept the testrpc init no way to know when test blockchain actually starts advance_block_by(1) - - # Process.sleep(4000 + @block_time) # NOTE: since couldnt find a way to intercept the testrpc init no way to know when test blockchain actually starts end def stop do @@ -28,7 +26,6 @@ defmodule ETH.TestClient do wait_until_next_block(block_no_during_function_call) if block_count > 1 do - # NOTE: it was 50 kind , isthis is needed probably because JS timers/setInterval etc are problematic? Process.sleep(block_count * @block_time - @block_time) end end