-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy path.travis.yml
70 lines (61 loc) · 1.79 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
dist: trusty
language: c
os:
- linux
- osx
env:
- TRAVIS_PYTHON_VERSION="2.7"
- TRAVIS_PYTHON_VERSION="3.5"
matrix:
fast_finish: true
allow_failures:
- os: osx
- env: TRAVIS_PYTHON_VERSION="3.5"
addons:
postgresql: "9.6"
apt:
packages:
- postgresql-9.6-postgis-2.3
services:
- postgresql
- postgis
cache:
directories:
- $HOME/.cache/pip
before_cache:
- rm -f $HOME/.cache/pip/log/debug.log
before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
export PG_DATA=$(brew --prefix)/var/postgres &&
rm -rf $PG_DATA &&
initdb $PG_DATA -E utf8 &&
pg_ctl -w start -l postgres.log --pgdata ${PG_DATA} &&
createuser -s postgres;
fi
- psql -c 'CREATE EXTENSION postgis;' -U postgres
- psql -c 'create database travis_ci_test;' -U postgres
# add miniconda - from https://gist.github.com/dan-blanchard/7045057
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
wget -O miniconda.sh http://repo.continuum.io/miniconda/Miniconda${TRAVIS_PYTHON_VERSION:0:1}-latest-Linux-x86_64.sh;
fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
curl -o miniconda.sh https://repo.continuum.io/miniconda/Miniconda${TRAVIS_PYTHON_VERSION:0:1}-latest-MacOSX-x86_64.sh;
fi
- chmod +x miniconda.sh
- ./miniconda.sh -b -p $HOME/miniconda
- export PATH=$HOME/miniconda/bin:$PATH
# - conda update --yes conda python
# create environment in conda
- conda env create -f conda_env.yml python=$TRAVIS_PYTHON_VERSION
- conda install -c conda-forge -y geos=3.6.2
- source activate gaia
# install test packages
- pip install -r requirements-dev.txt
install:
- cd $TRAVIS_BUILD_DIR
- pip install -e .
script:
- coverage run --source gaia -m unittest discover
- flake8 --config tests/flake8.cfg gaia tests
after_success:
coveralls