-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path.travis.yml
77 lines (75 loc) · 2.93 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
77
dist: bionic
language: go
go:
- 1.14
env:
- DOCKER_COMPOSE_VERSION=1.24.1
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 install -o Dpkg::Options::="--force-confold" --force-yes -y 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
# install dockerize
- wget https://github.com/jwilder/dockerize/releases/download/v0.6.1/dockerize-linux-amd64-v0.6.1.tar.gz
- sudo tar -C /usr/local/bin -xzvf dockerize-linux-amd64-v0.6.1.tar.gz
- rm dockerize-linux-amd64-v0.6.1.tar.gz
- docker --version
# LINGVO GRAPH VARS
- export HOSTNAME=lingvograph.com
- export HTTP_PORT=8100
- export HTTPS_PORT=443
- export SERVER_URL=http://lingvograph.com
- export CADDY_URLS=http://localhost:8100
- export ADMIN_SECRET=admin
- export [email protected]
- export SYSTEM_PWD=s1st3m11
- export [email protected]
- export ADMIN_PWD=adm1n11
- export API_KEY_SECRET=test
- export APP_ID=QTDH9KY5
- export APP_SECRET=test
- export API_KEY=test
- export DGRAPH_TOKEN=test
- export JWT_SECRET=test
- export PUBSUBD_ADDR=:4302
- export NATS_URI=nats://nats:4222
- export DGRAPH_URL=http://localhost:8080
- export LOG_MAX_SIZE=500k
- export LOG_MAX_FILE=5
# AWS S3 config
- export AWS_S3_ENDPOINT=http://minio:9000
- export AWS_S3_BUCKET=pandora
- export AWS_ACCESS_KEY_ID=test
- export AWS_SECRET_ACCESS_KEY=pand0ra11
- export AWS_REGION=eu-west-1
- curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
- sudo python3 get-pip.py
- sudo python3 -m pip install pipenv
# END OF LINGVO GRAPH VARS
- docker-compose build
- docker-compose up -d
# wait all services is up
- dockerize -timeout 100s -wait-retry-interval 5s -wait http://localhost:4201/api/health true || true
- docker-compose ps
- docker-compose logs
- cd scripts && pip install -r requirements.txt && pip install pytest && cd ..
script:
- cd scripts
- pytest
- docker-compose down -v