-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
76 lines (76 loc) · 3.94 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
70
71
72
73
74
75
76
language: elixir
cache:
directories:
- deps
- _build
services:
- docker
- postgresql
addons:
postgresql: "9.5"
apt:
packages:
- wkhtmltopdf
elixir:
- 1.4.2
otp_release:
- 19.2
env:
global:
- MIX_ENV=test
- MAIN_BRANCHES="master develop staging" # Branches on which you want version to be incremented
- RELEASE_BRANCH="master"
# Docker
- DOCKER_HUB_ACCOUNT=nebo15
- secure: "UUwsEKx6jWERyz/fNXPoEj5HOQZM6W7uYiYm0AaEOaXvkgwtEHappMuk+18Z3qKLkCKYp3UvZw1teGIpd9lwHwn7DPiql1IKWB2LTmH5T6OyMLESzzlSLeC+xSojQpFOkB+ubloA8hW0PRA5AX27VvCdgirWlFIKhwsM5jWMmrJWU+ds5gjw7+eZB4L8E1pi77JoHmEW1MOSp2FRZssMi2f36cPmY5A9mryA9rRCVr+4MsKDZqfOdZH5zi426nooGmQ2DEBpnyELBqxyYcvwiy2qOceiMZYgaCLI5RypcFmWdwmEbJvJExfhmNal+rmft0RXN/CNugu0yuru8/klhGC/Q5ec/HfjazVydRCtKK9Ro6zsKTUHWfc1OCXKvRUEeTzZZ4slAsWPjWs8Lqt/q57EA3k3SJNBe2JUQLyW5K73yA0p//ftr5c3h7ifstvrCulcKrtScuJEm5RCDrBz8o5tocptbHwlDXiB8npInBZu/OBBHsY0sAsQgsf90G0xT7XDwx8zH6lWx9KhtV30/+P8JDa2UghxOquL/WQgxrMPnbM8YokhzxLa8MJ5mPBkipKmFca7CjEzBAfP/dPNOHCC1bInMiLclA2WFV1FvynF7dFMWN/vQm11pfkkDBPzbTSC319UWLFZ6ucqj73P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AzfBB4hKd5WqT+8q9QIgvVapVciOzQ4VqwGGAHmZsKq5VUEdAmdi1/+T2YLcpz4/+OYomZ2boOmHKlS8y5c83PzwUfqp+0aeh9lwzYdJAEHBNzb7jGXUH+7vxQwvc4yaB+RKSwI4Ex+s2MDTmS99Ui18DvDuAxcdpG0uqvgi+2pT+DxCjlebuFUYgPK0IQtqJrbVZOsMlwUeQQyQoEQhjGtl3vfTYBOH8zDyOtHL2z5jyoA9J366cT6yOSOU85+mNyCeRdThCQ907dGxt6cj7hn9b94hhGvGABg4z527BvRQQlngyAbQr71UqyEUzx+QrJ0oFdEqhnputNtjr4="
branches:
# Releases are generated automatically, stop infinite build loop
except:
- /[0-9]*\.[0-9]*\.[0-9]*/
before_install:
# Expose MQ and DB to Docker container
- sudo ./bin/ci/init-db.sh
before_script:
# Run X server to for wkhtmltopdf
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
script:
# Increment version in mix.exs
- ./bin/ci/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
# Add --pro if you using private repo.
- mix coveralls.travis --exclude pending
# Run static code analysis
- mix credo --strict
# 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 man_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 man_api --details --since 5h
after_success:
# Submit Docker container to Docker Hub and create GitHub Release by pushing tag with changelog
- ./bin/ci/push.sh
- ./bin/ci/deploy.sh