71 lines
2.4 KiB
YAML
71 lines
2.4 KiB
YAML
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:
|
|
- 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 Elasticsearch 7
|
|
- curl -s -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.5.1-amd64.deb
|
|
- sudo dpkg -i --force-confnew elasticsearch-7.5.1-amd64.deb
|
|
- sudo sed -i.old 's/-Xms1g/-Xms128m/' /etc/elasticsearch/jvm.options
|
|
- sudo sed -i.old 's/-Xmx1g/-Xmx128m/' /etc/elasticsearch/jvm.options
|
|
- echo -e '-XX:+DisableExplicitGC\n-Djdk.io.permissionsUseCanonicalPath=true\n-Dlog4j.skipJansi=true\n-server\n' | sudo tee -a /etc/elasticsearch/jvm.options
|
|
- sudo chown -R elasticsearch:elasticsearch /etc/default/elasticsearch
|
|
- sudo systemctl start elasticsearch
|
|
|
|
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
|
|
|
|
notifications:
|
|
irc:
|
|
channels:
|
|
- "irc.freenode.org#pygeoapi-activity"
|
|
use_notice: true |