-
Notifications
You must be signed in to change notification settings - Fork 8
/
.travis.yml
88 lines (80 loc) · 2.33 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
78
79
80
81
82
83
84
85
86
87
88
language: python
sudo: true
python: 3.7
services:
- docker
env:
# HTTP Port for the whole stack (nginx frontend proxy)
# We can't use port 80 on travis
- HTTP_PORT=80
WMS_BASE_URL=http://fbf.test/geoserver/wms
GEOSERVER_BASE_URL=http://fbf.test/geoserver
POSTGREST_BASE_URL=http://fbf.test/api
PGRST_SERVER_PROXY_URI=http://fbf.test/api
addons:
hosts:
- fbf.test
- postgrest.fbf.test
- swagger.fbf.test
- geoserver.fbf.test
before_install:
# We use makefile to control build
- sudo apt -y update; sudo apt -y install make zip wget curl net-tools
# We use dnsmasq to resolve domain name
- pushd fixtures/tests/scripts
- sudo bash extract-interface-ip.sh
- export IP_ADDR=$(cat ip-address.txt)
- echo $IP_ADDR
- sudo bash modify-dnsmasq-config.sh
- popd
before_script:
# Frontend deployment
- sudo netstat -tulnp
- pushd deployment
- cp .sample.env .env
- cp docker-compose.override.local-volumes.yml docker-compose.override.yml
- popd
# Docker OSM backend
- pushd docker-osm/indonesia-buildings
- make prepare-integration-tests
- popd
# Geoserver
- pushd geoserver
- cp .sample.env .env
- cp docker-compose.override.local-volumes.yml docker-compose.override.yml
- popd
# Schema and test data preparations
- pushd deployment
- make up
- make geoserver-up
- make backend-up SERVICE=db
- make wait-db-ready
# Twice because db is restarting when initialized
- make wait-db-ready
- pushd ../docker-osm/indonesia-buildings
- cat /etc/resolv.conf
- docker-compose exec db cat /etc/resolv.conf
- docker-compose exec db /bin/sh -c "apt -y update; apt -y install dnsutils"
- docker-compose exec db nslookup fbf.test
- popd
- make backend-up SERVICE=imposm
- make backend-first-pbf-import
- make backend-wait-first-pbf-import
- make backend-stop SERVICE=imposm
- make backend-schema-test
- make wait-geoserver-ready
- make backend-populate-test-data
- make backend-up SERVICE=testrunner
- make backend-up SERVICE=postgrest
- make backend-up SERVICE=swagger
- make wait-backend-ready
- popd
script:
# Backend deployment tests
- pushd deployment
- make backend-test
# forecast test
# forecast test needs hazard map model
- make backend-import-fixtures TARGET=tests/backend/data/sql/hazard_map.sql
- make backend-forecast-test
- popd