-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
69 lines (69 loc) · 5.83 KB
/
.travis.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
language: elixir
sudo: required
cache:
directories:
- deps
services:
- docker
- postgresql
addons:
postgresql: "9.5"
elixir:
- 1.4.2
otp_release:
- 19.2
env:
global:
- MIX_ENV=test
- DOCKER_HUB_ACCOUNT=nebo15
- MAIN_BRANCHES="master develop staging" # Branches on which you want version to be incremented
- RELEASE_BRANCH="master"
- secure: r4X8qA7x/vfjc8cVFvd32HI2vjG6+K4qzXcNs4wVB113i4Bd7hWGgMELssP8qoBDOYZaTRUcmJreMraJJx1sJ/Eaav87dGu7ujtwCX6Ry9h+Vi0tLIfZeAWqusQiwEOELPfDDrzlck9Up3c95rMnYsCBBpjHUfUvq46BewpIUmh/FXzF2DvRneIqY+r8AoHeUimRQuUClsnhcq4QInj1EpBdxL2T0TJJm9vHU6homnVOqlcaUw9TU+zU3NvizzfHwKI31gjuEgaLXwnOVJeAjPuW0/ysKzAO/Z5ijPp9ORvL2XuB4xzl0MHdk4undVuBOjIHF5wqmOC2nRe4/43urNLyYj2pFHDBcce21ShZvtrkCm45es52f6RZMLoVnmQdZOSlQuSnSXDlXTQForVSGXxg9Odia2AMryUseaIHu/tM7Ql7/m5D5/rFp6mnG31PDvZmDgaLJvIw+7HxzuAfFkvkIAn68ML7buiBxtk5K6O0HyID+WR6tSqVkpv52aNI6bZCwC8K2NyVGGTqJR+0ShOfwuWdp77VazI9rC0bejN+gJY1cixeg9Kdi4ApPE69Z1tGldRHO1ifDgkALTw6DGYAH52vrDrS0k0EZr1nbdEdd7HLlD2s6a1j0n/fT6hCZBGl2sb9ljEr9//DrdbXQZyWihtXY9N4/s82txf8o0o=
- secure: aI8fdolK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//BPWqAuqv2sAzvQbDSUtlawNyg0XYLXd0sgiZKZU+uM3ghsduplJY/zIYm6n7KUoWIIft6ez3lPvXuSniXCVuM54HZfIo8jFx1wTNlIGh/hIVtVsJSbAR7cTbAlUWg2GXBh1y2wjqDcJ9CQZgojcMpjPvDR5T8PCQCFX4KR8=
branches:
# Releases are generated automatically, stop infinite build loop
except:
- /[0-9]*\.[0-9]*\.[0-9]*/
before_install:
# Install heroku toolchain
- wget -O- https://toolbelt.heroku.com/install-ubuntu.sh | sh
# Expose MQ and DB to Docker container
- sudo ./bin/ci/init-db.sh
script:
# Increment version in mix.exs
- "./bin/version-increment.sh"
# Install dependencies
- "mix deps.get"
# Run all tests except pending ones
- "mix test --exclude pending --trace"
# Submit code coverage report to Coveralls
- "mix coveralls.travis"
# Run static code analysis
- "mix credo"
# Check code style
- "mix dogma"
# Build Docker container
- "./bin/build.sh"
# Initialize DB for Docker container
- "MIX_ENV=dev mix ecto.setup"
# Run Docker container
- sudo ./bin/start.sh
- sleep 5
- docker ps
- RUNNING_CONTAINERS=`docker ps | wc -l`;
- if [ "${RUNNING_CONTAINERS//[[:space:]]/}" == "1" ]; then echo "[E] Container is not started!"; docker logs gateway_api --details --since 5h; exit 1; fi;
# Run acceptance tests on Docker container
- "CONTAINER_HTTP_HOST=localhost CONTAINER_HTTP_PORT=4000 mix test test/*/acceptance"
after_failure:
- docker logs gateway_api --details --since 5h
after_success:
- ./bin/ci/push.sh
- ./bin/ci/deploy.sh
- docker logs gateway_api --details --since 5h