forked from GeoNode/geonode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
211 lines (192 loc) · 7.05 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
sudo: false
language: python
cache:
pip: true
directories:
- $HOME/buildout-cache
before_cache:
- rm -f $HOME/.cache/pip/log/debug.log
virtualenv:
system_site_packages: true
services:
- docker
- postgresql
addons:
hosts:
- geonode
postgresql: 9.6
apt:
packages:
- postgresql-9.6-postgis-2.3
- nginx
matrix:
fast_finish: true
include:
- name: "GeoServer-backend Core Modules Smoke Tests"
python: 2.7
env:
- BACKEND: 'geonode.geoserver'
ON_TRAVIS: 'True'
TEST_RUN_CORE: 'True'
MONITORING_ENABLED: 'False'
- name: "GeoServer-backend Contrib Apps Smoke Tests"
python: 2.7
env:
- BACKEND: 'geonode.geoserver'
ON_TRAVIS: 'True'
TEST_RUN_INTERNAL_APPS: 'True'
MONITORING_ENABLED: 'False'
- name: "GeoServer-backend Integration Tests"
python: 2.7
env:
- BACKEND: 'geonode.geoserver'
DOCKER_COMPOSE_VERSION: 1.19.0
# This is GeoServer server address
GEOSERVER_SERVER_URL: http://localhost:8080/geoserver/
GEOSERVER_SERVER_PORT: 8080
ON_TRAVIS: 'True'
TEST_RUN_INTEGRATION: 'True'
TEST_RUN_INTEGRATION_CSW: 'False'
TEST_RUN_INTEGRATION_BDD: 'False'
MONITORING_ENABLED: 'False'
CELERY_ALWAYS_EAGER: 'True'
- name: "GeoServer-backend Integration CSW Tests"
python: 2.7
env:
- BACKEND: 'geonode.geoserver'
DOCKER_COMPOSE_VERSION: 1.19.0
# This is GeoServer server address
GEOSERVER_SERVER_URL: http://localhost:8080/geoserver/
GEOSERVER_SERVER_PORT: 8080
ON_TRAVIS: 'True'
TEST_RUN_INTEGRATION: 'False'
TEST_RUN_INTEGRATION_CSW: 'True'
TEST_RUN_INTEGRATION_BDD: 'False'
MONITORING_ENABLED: 'False'
CELERY_ALWAYS_EAGER: 'True'
- name: "GeoServer-backend Integration BDD Tests"
python: 2.7
env:
- BACKEND: 'geonode.geoserver'
DOCKER_COMPOSE_VERSION: 1.19.0
# This is GeoServer server address
GEOSERVER_SERVER_URL: http://localhost:8080/geoserver/
GEOSERVER_SERVER_PORT: 8080
ON_TRAVIS: 'True'
TEST_RUN_INTEGRATION: 'False'
TEST_RUN_INTEGRATION_CSW: 'False'
TEST_RUN_INTEGRATION_BDD: 'True'
MONITORING_ENABLED: 'False'
CELERY_ALWAYS_EAGER: 'True'
- name: "QGis Server-backend Core Modules Smoke Tests"
python: 2.7
env:
- BACKEND: 'geonode.qgis_server'
DJANGO_SETTINGS_MODULE: 'geonode.local_settings'
DOCKER_COMPOSE_VERSION: 1.19.0
# This is qgis server address
QGIS_SERVER_URL: http://localhost:9000/
# This is the location of docker network bridge
# So QGIS server can access this address
SITEURL: http://localhost:8000/
QGIS_SERVER_PORT: 9000
ON_TRAVIS: 'True'
TEST_RUN_CORE: 'True'
MONITORING_ENABLED: 'False'
CELERY_ALWAYS_EAGER: 'True'
- name: "QGis Server-backend Contrib Apps Smoke Tests"
python: 2.7
env:
- BACKEND: 'geonode.qgis_server'
DJANGO_SETTINGS_MODULE: 'geonode.local_settings'
DOCKER_COMPOSE_VERSION: 1.19.0
# This is qgis server address
QGIS_SERVER_URL: http://localhost:9000/
# This is the location of docker network bridge
# So QGIS server can access this address
SITEURL: http://localhost:8000/
QGIS_SERVER_PORT: 9000
ON_TRAVIS: 'True'
TEST_RUN_INTERNAL_APPS: 'True'
MONITORING_ENABLED: 'False'
CELERY_ALWAYS_EAGER: 'True'
- name: "QGis Server-backend Integration Tests"
python: 2.7
env:
- BACKEND: 'geonode.qgis_server'
DJANGO_SETTINGS_MODULE: 'geonode.local_settings'
DOCKER_COMPOSE_VERSION: 1.19.0
# This is qgis server address
QGIS_SERVER_URL: http://localhost:9000/
# This is the location of docker network bridge
# So QGIS server can access this address
SITEURL: http://localhost:8000/
QGIS_SERVER_PORT: 9000
ON_TRAVIS: 'True'
TEST_RUN_INTEGRATION: 'True'
MONITORING_ENABLED: 'False'
CELERY_ALWAYS_EAGER: 'True'
branches:
only:
- master
- 2.8.x
- 2.6.x
before_install:
- mkdir -p $HOME/buildout-cache/{eggs,downloads}
- scripts/misc/geoserver_server_setup.sh before_install
- scripts/misc/qgis_server_setup.sh before_install
- chmod +x scripts/misc/bdd_setup.sh
- scripts/misc/bdd_setup.sh before_install
install:
- sudo apt-get -qq -y update
- sudo apt-get install -y libgdal1h python-gdal gdal-bin spatialite-bin
- sudo apt-get install -y python-virtualenv python-imaging python-lxml python-pyproj python-shapely python-nose python-httplib2 python-httplib2 gettext
- sudo apt-get install -y python-dev libxml2 libxml2-dev libxslt1-dev zlib1g-dev libjpeg-dev libpq-dev libgdal-dev git default-jdk
- sudo add-apt-repository -y ppa:webupd8team/java
- sudo apt-get update
- sudo apt-get install -y --force-yes oracle-java8-set-default ant maven --no-install-recommends
- sudo update-java-alternatives --set java-8-oracle
- pip install -r requirements.txt --upgrade
- pip install -e . --upgrade
- pip install pygdal==`gdal-config --version`
- pip install codecov
before_script:
# Initialize DB
# - sudo apt-get install postgresql-9.6-postgis-2.3 -y -q
- psql -U postgres -c "create extension postgis"
- chmod +x scripts/misc/create_dbs_travis.sh
- scripts/misc/create_dbs_travis.sh before_script
# For GeoServer Server Travis steps
- scripts/misc/geoserver_server_setup.sh before_script
# For QGIS Server Travis steps
- scripts/misc/qgis_server_setup.sh before_script
- scripts/misc/bdd_setup.sh before_script
# Start NGINX server
- sudo nginx -s stop
- sudo nginx -c `pwd`/scripts/misc/nginx_integration.conf
# Setup GeoNode
- paver setup
script:
- paver run_tests --coverage --local false
after_script:
# For GeoServer Server Travis steps
- scripts/misc/geoserver_server_setup.sh after_script
# For QGIS Server Travis steps
- scripts/misc/qgis_server_setup.sh after_script
# Stop NGINX server
- sudo nginx -c `pwd`/scripts/misc/nginx_integration.conf -s stop
# Cleanup
- paver reset_hard
# after_success:
# - codecov
# - bash <(curl -s https://codecov.io/bash) -t 2c0e7780-1640-45f0-93a3-e103b057d8c8
notifications:
# irc:
# channels:
# - "irc.freenode.org#geonode"
# use_notice: true
email:
# slack: geonode-sprint:oQylJRkU9feZ8JruGi6czWwe