~cosmicrose/liberator_example

8042e668cf830cbd303d2a98847e9eef41d4f820 — Rosa Richter 8 months ago 062da55
Actually add Earthfile
2 files changed, 38 insertions(+), 0 deletions(-)

A .earthignore
A Earthfile
A .earthignore => .earthignore +6 -0
@@ 0,0 1,6 @@
.git
.github
_build
deps
*.md
guides

A Earthfile => Earthfile +32 -0
@@ 0,0 1,32 @@
ARG MIX_ENV=dev

all:
  BUILD +test

get-deps:
  FROM elixir:1.12-alpine
  RUN mix do local.rebar --force, local.hex --force
  COPY mix.exs .
  COPY mix.lock .

  RUN mix deps.get

compile-deps:
  FROM +get-deps
  RUN MIX_ENV=$MIX_ENV mix deps.compile

build:
  FROM +compile-deps

  COPY config ./config
  COPY priv ./priv
  COPY lib ./lib

  RUN MIX_ENV=$MIX_ENV mix compile

test:
  FROM --build-arg MIX_ENV=test +build

  COPY test ./test

  RUN MIX_ENV=test mix test