Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

56 lines (41 sloc) 1.542 kb
language: python
python:
- 2.6
- 2.7
- 3.3
notifications:
email:
on_failure: change
services:
- postgresql
env:
- POSTGIS_VERSION=1.5
- POSTGIS_VERSION=2
install:
# Add PPA for geos 3.3.x
- if [[ "$POSTGIS_VERSION" != "1.5" ]]; then sudo apt-add-repository -y ppa:sharpie/for-science; fi
# Install PostGIS 2.x
- if [[ "$POSTGIS_VERSION" != "1.5" ]]; then sudo apt-add-repository -y ppa:sharpie/postgis-nightly; fi
- if [[ "$POSTGIS_VERSION" != "1.5" ]]; then sudo apt-get update; fi
# Install PostGIS
- sudo apt-get install postgresql-9.1-postgis -q
# Install flake8 style checker
- pip install flake8
before_script:
# Create database user "gis"
- psql -c "CREATE ROLE gis PASSWORD 'gis' SUPERUSER CREATEDB CREATEROLE INHERIT LOGIN;" -U postgres
# Create database "gis"
- psql -c 'CREATE DATABASE gis;' -U postgres
# Add PostGIS extension to "gis" database
- if [[ "$POSTGIS_VERSION" == "1.5" ]]; then psql -d gis -U postgres -f /usr/share/postgresql/9.1/contrib/postgis-1.5/postgis.sql; fi
- if [[ "$POSTGIS_VERSION" == "1.5" ]]; then psql -d gis -U postgres -f /usr/share/postgresql/9.1/contrib/postgis-1.5/spatial_ref_sys.sql; fi
- if [[ "$POSTGIS_VERSION" != "1.5" ]]; then psql -d gis -U postgres -c "CREATE EXTENSION postgis;"; fi
script:
# Run the library through flake8
- flake8 geoalchemy2 --ignore=E711
# Run the unit test suite
- python setup.py nosetests -v
after_script:
# Report coverage results to coveralls.io
- pip install coveralls
- coveralls
Jump to Line
Something went wrong with that request. Please try again.