-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy path.travis.yml
70 lines (55 loc) · 2 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
language: elixir
elixir:
- 1.6
- 1.8
otp_release:
- 20.0
matrix:
include:
- elixir: 1.8
otp_release: 21.2
cache:
directories:
- deps
sudo: required
services:
- docker
env:
global:
- DGRAPH_HOST_TEST=localhost
- DGRAPH_PORT_TEST=9080
- MIX_ENV=test
- DOCKER_COMPOSE_VERSION=1.19.0
before_install:
# update is required to update the repositories to see the new packages for
# Docker.
- sudo apt-get update
# Now we can install the newer docker-engine which is required for the newer
# docker-composer we will install next. The messy options are to force it to
# be non-interactive (normally it asks you a bunch of config questions).
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
# Print out the current docker-compose version. Once this reports 1.6+ then we
# do not need the following steps.
- docker-compose --version
# As of the writing of this script Travis has docker-compose v1.4.2, we need
# to update it to 1.8+. $DOCKER_COMPOSE_VERSION is provide from the `env`
# above.
- sudo rm /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
# Check that docker-compose is now running the latest version (or at least the
# one we specified). This is not to be confused with the version we printed
# before doing the update.
- docker-compose --version
# Setup your application stack. You may need to tweak these commands if you
# doing out-of-the-ordinary docker-compose builds.
- docker-compose pull
- docker-compose build
- docker-compose up -d
# You will want this for logging. If one of your containers does not build for
# whatever reason it's best to report that now before your tests start
# otherwise it can be really tricky to debug why tests are failing sometimes.
- docker ps
script:
- mix coveralls.travis