/
config.yml
113 lines (95 loc) · 2.4 KB
/
config.yml
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
version: 2.1
jobs:
build:
docker:
- image: circleci/elixir:1.8.2
environment:
MIX_ENV: test
steps:
- checkout
- run: mix local.hex --force
- run: mix local.rebar --force
- restore_cache:
key: v1-deps-cache-{{ checksum "mix.lock" }}
- run: mix do deps.get, deps.compile
- save_cache:
key: v1-deps-cache-{{ checksum "mix.lock" }}
paths:
- deps
- ~/.mix
- _build
- run: mix compile
- run: echo "$OTP_VERSION $ELIXIR_VERSION" > .version_file
- restore_cache:
keys:
- plt-cache-{{ checksum ".version_file" }}-{{ checksum "mix.lock" }}
- run: mix dialyzer --plt
- save_cache:
key: plt-cache-{{ checksum ".version_file" }}-{{ checksum "mix.lock" }}
paths:
- _build
- deps
- ~/.mix
dialyzer:
docker:
- image: circleci/elixir:1.8.2
environment:
MIX_ENV: test
steps:
- checkout
- run: echo "$OTP_VERSION $ELIXIR_VERSION" > .version_file
- restore_cache:
keys:
- plt-cache-{{ checksum ".version_file" }}-{{ checksum "mix.lock" }}
- run:
name: Execute dialyzer
command: mix dialyzer --halt-exit-status
test:
docker:
- image: circleci/elixir:1.8.2
steps:
- checkout
- restore_cache:
key: v1-deps-cache-{{ checksum "mix.lock" }}
- run: mix coveralls.html
- store_artifacts:
path: cover
destination: coverage_results
generate_documentation:
docker:
- image: circleci/elixir:1.8.2
environment:
MIX_ENV: test
steps:
- checkout
- restore_cache:
key: v1-deps-cache-{{ checksum "mix.lock" }}
- run: mix docs
- store_artifacts:
path: doc
destination: documentation
format_check:
docker:
- image: circleci/elixir:1.8.2
environment:
MIX_ENV: test
steps:
- checkout
- run: mix format --check-formatted
workflows:
version: 2
build_and_test:
jobs:
- build
- format_check:
requires:
- build
- generate_documentation:
requires:
- build
- dialyzer:
requires:
- build
- test:
requires:
- build