-
Notifications
You must be signed in to change notification settings - Fork 17
/
.travis.yml
106 lines (95 loc) · 3.45 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
# Common to all builds in the build matrixs
os: linux
language: python # This lets us use newer python versions from virtualenv
sudo: false
cache:
apt: true
pip: true
directories:
# commented out - we want to get fresh overpass file each time
#- /tmp # cache any previously downloaded .osm files
timeout: 1000
compiler: clang
dist: trusty
addons:
postgresql: "9.5"
apt:
packages:
- postgresql-9.5-postgis-2.3
- postgis
- osm2pgsql
# python defs need to be here as well as in include for test matrix
# see https://docs.travis-ci.com/user/customizing-the-build#Explicitly-Included-Jobs-need-complete-definitions
python:
- '3.6'
- '3.5'
- '3.4'
env:
global:
- ON_TRAVIS=true
# Build environment specific options - one build per top level item in include list
matrix:
fast_finish: true
include:
env: TRAVIS_CONFIG=PYTHON3 # used if you want to run environment specific stuff in before_script
- python: '3.6'
env: TRAVIS_CONFIG=PYTHON3 # used if you want to run environment specific stuff in before_script
- python: '3.5'
env: TRAVIS_CONFIG=PYTHON3 # used if you want to run environment specific stuff in before_script
- python: '3.4'
env: TRAVIS_CONFIG=PYTHON3 # used if you want to run environment specific stuff in before_script
exclude:
# This is a daft hack to solve a problem where travis creates a
# default build for every python variation we try to build with
# see https://github.com/travis-ci/travis-ci/issues/4681#issuecomment-277513723
# and
# https://github.com/kartoza/osm-reporter/pull/109#issuecomment-292807417
- python: '3.6'
- python: '3.5'
- python: '3.4'
git:
depth: 30
#addons:
#sauce_connect:
# username: "timlinux"
# access_key: "Your Sauce Labs access key"
notifications:
irc:
channels:
- "irc.freenode.org#kartoza"
use_notice: true
email:
- tim@kartoza.com
# webhooks:
# urls:
# - https://webhooks.gitter.im/e/467e3aff72e344d1dae3 # need to get a proper app key first
# on_success: change # options: [always|never|change] default: always
# on_failure: always # options: [always|never|change] default: always
# on_start: never # default: never
before_install:
#- ./ci/travis/${TRAVIS_CONFIG}/before_install.sh
install:
#- ./ci/travis/${TRAVIS_CONFIG}/install.sh
-
before_script:
- echo "Build starting on " `date`
- psql -U postgres -c "create extension postgis"
- psql -U postgres -c "create database template_postgis encoding 'UTF8' TEMPLATE template0;"
- psql -U postgres -c "update pg_database set datistemplate=true where datname='template_postgis';"
- psql -U postgres -c "create extension postgis;" template_postgis
- ls -lah /usr/share/postgresql/
- ls -lah /usr/share/postgresql/9.5/
- ls -lah /usr/share/postgresql/9.5/contrib/
# Check that legacy scripts are available before upgrading postgis to a newer version than 2.1 - they are required!
- ls -lah /usr/share/postgresql/9.5/contrib/postgis-2.3/
- psql -U postgres template_postgis < /usr/share/postgresql/9.5/contrib/postgis-2.3/legacy_minimal.sql
- psql -U postgres template_postgis < /usr/share/postgresql/9.5/contrib/postgis-2.3/legacy_gist.sql
- echo "Databases:"
- psql -l
- which pgsql2shp
- pip install -r requirements-dev.txt
script:
- PYTHONPATH=`pwd`/reporter:`pwd`:$(PYTHONPATH) nosetests -v --with-id --with-xcoverage --with-xunit --verbose --cover-package=reporter reporter
- make pep8
after_script:
-