-
Notifications
You must be signed in to change notification settings - Fork 0
/
Earthfile
56 lines (44 loc) · 1.03 KB
/
Earthfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
all-test:
BUILD +formatter-test
BUILD +analisys-test
BUILD +unit-test
ci:
BUILD +formatter-test
BUILD +unit-test
analisys-test:
FROM +dialyzer-setup
RUN mix dialyzer --format dialyxir
formatter-test:
FROM +test-setup
RUN mix format --check-formatted
RUN mix compile --warning-as-errors
RUN mix credo --strict
unit-test:
FROM +test-setup
RUN mix test
setup-base:
ARG ELIXIR=1.11.2
ARG OTP=23.1.1
FROM hexpm/elixir:$ELIXIR-erlang-$OTP-alpine-3.12.0
RUN apk add --no-progress --update build-base
ENV ELIXIR_ASSERT_TIMEOUT=10000
WORKDIR /bank
test-setup:
FROM +setup-base
ENV MIX_ENV=test
COPY mix.exs .
COPY mix.lock .
COPY .formatter.exs .
RUN mix local.rebar --force
RUN mix local.hex --force
RUN mix do deps.get, deps.compile
COPY --dir config lib test ./
dialyzer-setup:
FROM +setup-base
ENV MIX_ENV=dev
COPY mix.exs .
COPY mix.lock .
RUN mix local.rebar --force
RUN mix local.hex --force
RUN mix do deps.get, deps.compile
COPY --dir lib ./