forked from geopython/pygeoapi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
57 lines (47 loc) · 1.69 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
language: python
dist: xenial
sudo: false
env:
global:
- PYGEOAPI_CONFIG="$(pwd)/pygeoapi-config.yml"
- CPLUS_INCLUDE_PATH=/usr/include/gdal
- C_INCLUDE_PATH=/usr/include/gdal
python:
- "3.6"
- "3.7"
services:
- elasticsearch
- postgresql
- mongodb
addons:
postgresql: 9.6
before_install:
- sudo apt-add-repository ppa:ubuntugis/ubuntugis-unstable -y
- sudo apt-get -qq update
- sudo apt-get install -qq build-essential python3-dev python3-setuptools python-all python3-all python-setuptools
- sudo apt-get install -y libsqlite3-mod-spatialite devscripts fakeroot debhelper
- sudo apt-get install -y postgresql-9.6-postgis-2.4
- sudo apt-get install -y libgdal-dev gdal-bin
- sudo apt-get install -y mongodb
install:
# follow GDAL installed version for Python bindings
- pip3 install GDAL==`gdalinfo --version | cut -d' ' -f2 | cut -d',' -f1`
- pip3 install -r requirements.txt
- pip3 install -r requirements-dev.txt
- pip3 install -r requirements-provider.txt
- python3 setup.py install
before_script:
- sleep 20
- python3 tests/load_es_data.py tests/data/ne_110m_populated_places_simple.geojson geonameid
- python3 tests/load_mongo_data.py tests/data/ne_110m_populated_places_simple.geojson
- pygeoapi generate-openapi-document -c pygeoapi-config.yml > pygeoapi-openapi.yml
- psql -U postgres -c 'create database test'
- psql -U postgres -d test -c 'create extension postgis'
- gunzip < tests/data/hotosm_bdi_waterways.sql.gz | psql -U postgres test
script:
- pytest --cov=pygeoapi
- make -C ./docs html
- find . -type f -name "*.py" | xargs flake8
after_success:
- python3 setup.py sdist bdist_wheel --universal
- sudo debuild -b -uc -us