Skip to content

Commit 1545428

Browse files
committed
Undo removed steps
1 parent 53da256 commit 1545428

File tree

1 file changed

+78
-38
lines changed

1 file changed

+78
-38
lines changed

.circleci/config.yml

+78-38
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,85 @@
11
version: 2
22
jobs:
33
build_test:
4-
parallelism: 1
54
docker:
65
- image: circleci/elixir:1.9.4
76
environment:
87
MIX_ENV: test
9-
- image: circleci/postgres:10.1-alpine
10-
environment:
11-
POSTGRES_USER: postgres
12-
POSTGRES_DB: ez_coins_test
13-
POSTGRES_PASSWORD: postgres
14-
working_directory: ~/api
158
steps:
169
- checkout
17-
1810
- run: mix local.hex --force
1911
- run: mix local.rebar --force
20-
2112
- restore_cache:
22-
keys:
23-
- v1-mix-cache-{{ .Branch }}-{{ checksum "mix.lock" }}
24-
- v1-mix-cache-{{ .Branch }}
25-
- v1-mix-cache
13+
key: v1-deps-cache-{{ checksum "mix.lock" }}
14+
- run: mix do deps.get, deps.compile
15+
- save_cache:
16+
key: v1-deps-cache-{{ checksum "mix.lock" }}
17+
paths:
18+
- deps
19+
- ~/.mix
20+
- _build
21+
- run: mix compile
22+
- run: echo "$OTP_VERSION $ELIXIR_VERSION" > .version_file
2623
- restore_cache:
2724
keys:
28-
- v1-build-cache-{{ .Branch }}
29-
- v1-build-cache
30-
- run: mix do deps.get, compile
25+
- plt-cache-{{ checksum ".version_file" }}-{{ checksum "mix.lock" }}
26+
- run: mix dialyzer --plt
3127
- save_cache:
32-
key: v1-mix-cache-{{ .Branch }}-{{ checksum "mix.lock" }}
33-
paths: "deps"
34-
- save_cache:
35-
key: v1-mix-cache-{{ .Branch }}
36-
paths: "deps"
37-
- save_cache:
38-
key: v1-mix-cache
39-
paths: "deps"
40-
- save_cache:
41-
key: v1-build-cache-{{ .Branch }}
42-
paths: "_build"
43-
- save_cache:
44-
key: v1-build-cache
45-
paths: "_build"
46-
28+
key: plt-cache-{{ checksum ".version_file" }}-{{ checksum "mix.lock" }}
29+
paths:
30+
- _build
31+
- deps
32+
- ~/.mix
33+
dialyzer:
34+
docker:
35+
- image: circleci/elixir:1.9.4
36+
environment:
37+
MIX_ENV: test
38+
steps:
39+
- checkout
40+
- run: echo "$OTP_VERSION $ELIXIR_VERSION" > .version_file
41+
- restore_cache:
42+
keys:
43+
- plt-cache-{{ checksum ".version_file" }}-{{ checksum "mix.lock" }}
4744
- run:
48-
name: Wait for DB
49-
command: dockerize -wait tcp://localhost:5432 -timeout 1m
50-
45+
name: Execute dialyzer
46+
command: mix dialyzer --halt-exit-status
47+
test:
48+
docker:
49+
- image: circleci/elixir:1.9.4
50+
- image: circleci/postgres:10.1-alpine
51+
environment:
52+
POSTGRES_USER: postgres
53+
POSTGRES_DB: ez_coins_test
54+
POSTGRES_PASSWORD: postgres
55+
steps:
56+
- checkout
57+
- restore_cache:
58+
key: v1-deps-cache-{{ checksum "mix.lock" }}
5159
- run: mix test
52-
53-
- store_test_results:
54-
path: _build/test/lib/ez_coins_api
60+
generate_documentation:
61+
docker:
62+
- image: circleci/elixir:1.9.4
63+
environment:
64+
MIX_ENV: test
65+
steps:
66+
- checkout
67+
- restore_cache:
68+
key: v1-deps-cache-{{ checksum "mix.lock" }}
69+
- run: mix docs
70+
- store_artifacts:
71+
path: doc
72+
destination: documentation
73+
format_check:
74+
docker:
75+
- image: circleci/elixir:1.9.4
76+
environment:
77+
MIX_ENV: test
78+
steps:
79+
- checkout
80+
- restore_cache:
81+
key: v1-deps-cache-{{ checksum "mix.lock" }}
82+
- run: mix format --check-formatted
5583
build_production:
5684
docker:
5785
- image: docker:17.05.0-ce-git
@@ -97,9 +125,21 @@ jobs:
97125
98126
workflows:
99127
version: 2
100-
test:
128+
checks:
101129
jobs:
102130
- build_test
131+
- format_check:
132+
requires:
133+
- build_test
134+
- generate_documentation:
135+
requires:
136+
- build_test
137+
- dialyzer:
138+
requires:
139+
- build_test
140+
- test:
141+
requires:
142+
- build_test
103143
deploy_production:
104144
jobs:
105145
- build_production:

0 commit comments

Comments
 (0)