forked from geoalchemy/geoalchemy2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
99 lines (80 loc) · 2.22 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
language: python
addons:
postgresql: 9.3
apt:
packages:
- postgresql-9.3-postgis-2.3
- python2.7-dev
- python3-dev
- autotools-dev
- libexpat1-dev
- libfreexl-dev
- libgeos-dev
- libproj-dev
- libreadline-dev
- libsqlite3-dev
- libxml2-dev
- zlib1g-dev
notifications:
email:
on_failure: change
services:
- postgresql
cache:
directories:
- libspatialite-4.3.0a
matrix:
include:
- python: 2.7
env:
- TOX_ENV=py27sqla11
- python: 3.4
env:
- TOX_ENV=py34sqla11
- python: 3.5
env:
- TOX_ENV=py35sqla11
- python: pypy
env:
- TOX_ENV=pypysqla11
env:
global:
- SPATIALITE_LIBRARY_PATH="/usr/local/lib/mod_spatialite.so"
install:
# Install Spatialite
- ./install-spatialite.sh
# Install tox
- pip install tox
# Install flake8 style checker
- pip install -r requirements.txt
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
# Create schema "gis" into database "gis"
- psql -d gis -c 'CREATE SCHEMA gis;' -U postgres
# Grant CREATE permission on database "gis" to role "gis"
- psql -c 'GRANT CREATE ON DATABASE gis TO "gis";' -U postgres
# Grant USAGE and CREATE permission on schema "gis" to role "gis"
- psql -d gis -c 'GRANT USAGE,CREATE ON SCHEMA gis TO "gis";' -U postgres
# Add PostGIS extension to "gis" database
- psql -d gis -c 'CREATE EXTENSION postgis;' -U postgres
script:
# Run the library through flake8
- flake8 geoalchemy2 tests --ignore=E711
# Run the unit test suite
- tox -e $TOX_ENV --sitepackages -- -v --cov geoalchemy2 --cov-report term-missing
after_script:
# Report coverage results to coveralls.io
- pip install coveralls
- coveralls
deploy:
provider: pypi
distributions: "sdist bdist_wheel"
user: erilem
password:
secure: eYqYIWlsCp/awFekONU9fRKjYeleO49rzf2qWNYG3HxWvp8+1mgjLubnMTIARHiKbB6/iF3PEfGQd7+ICIi6dxWQFxWaBu7HOFaOu0wOXweNbrwhDqKrnJRJ3/2CPRTlYARr7uJhXrVTQVOIC//mEtUX7atF5EVs8fW8BM3/iT0=
on:
tags: true
repo: geoalchemy/geoalchemy2