-
Notifications
You must be signed in to change notification settings - Fork 9
/
.travis.yml
59 lines (49 loc) · 2.68 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
language: python
dist: trusty
sudo: false
python:
- "3.5"
- "3.6"
env:
global:
secure: uH0xfi+u/FkddzkNdffIFMEv4edgHIE35no4E1nTZPCu8P3yraN9LOnfq+METCiHbFlC2O/6x32Azpg7x+jeOzfxdwCh7t5IpMg83cFV0wLZWqt940WV02LZTESjmGn5qFcJIp31pRZGxsr0S//TkfUrVNviwQ9j5kgztp7aCPfAiYYGrFEPaHuW8BiwZLVO6orAx3l/TPN3QeuF0nG0PVQiHmxbYhNTXVbjlYXRFW0swAfPBwit7yjPInqIpFbDD4slC5mhNS/EBffRE7kccPxLQAeyM69QVTkS0lHkgpEcir7NTLfKphA1uHoLtx+WutK8KwIQfzdhWOYzm0W8uVDUhAkL/p+bXT1SWMYGAtQTf6swatVjZgb0Hqb6xMXmhzMSb7vl/zhFTxkG+9TLF6edanj33j5I6wtxBUmB359Xaq9reNK1Yk6SuCAD56Yg90wHeEhgrxRURMWvjy1rV4vFPWRUx84wNdgHaTf89hiT9Vdp74eD8xqWEMgyOmgUfczJTqFcoNzfE1NKw9sycJkbuV4Sb/asjYGGadN+XTJBOAimjKj1xy3bbM2Aso6TuEMN15DE1Z9i3Ct9H9Lg9ThZvlE5EXJ3v+gP9XX81MpPyZ9pf84X1tNIiYwTzkg6JBwYiUVrf3P6M9pIKwvHSrSMos3Tn8tlIZHy4RTir/E=
addons:
postgresql: "9.6"
apt:
packages:
- postgresql-9.6-postgis-2.3
before_script:
- psql -U postgres -c "create extension postgis"
- createuser --superuser test_jane
before_install:
- wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
- chmod +x miniconda.sh
- ./miniconda.sh -b -p $HOME/miniconda
- export PATH=$HOME/miniconda/bin:$PATH
- conda update --yes conda
- conda create --yes -n condaenv python=$TRAVIS_PYTHON_VERSION
- conda install --yes -n condaenv pip
- source activate condaenv
- conda install --yes -c conda-forge obspy psycopg2 markdown flake8 gdal pyyaml pip geopy
- pip install codecov "django>=1.9,<1.10" djangorestframework djangorestframework-gis djangorestframework-jsonp djangorestframework-xml djangorestframework-yaml django-cors-headers django-debug-toolbar django-plugins defusedxml geojson markdown mkdocs mkdocs-bootswatch
# Copy local_settings template.
- cp $TRAVIS_BUILD_DIR/src/jane/local_settings.py.example $TRAVIS_BUILD_DIR/src/jane/local_settings.py
# Make sure django picks the correct geos library.
- echo -e "\n\nGDAL_LIBRARY_PATH = '/home/travis/miniconda/envs/condaenv/lib/libgdal.so'" >> $TRAVIS_BUILD_DIR/src/jane/local_settings.py
install:
- git version
- git fetch origin --tags --unshallow
- git remote add jane git://github.com/krischer/jane.git
- git fetch jane --tags
- git status
- git status
script:
- cd $TRAVIS_BUILD_DIR/src; coverage run --rcfile=.coveragerc ./manage.py test
# Docs only need to be built once.
- if [[ $TRAVIS_PYTHON_VERSION == '3.5' && $TRAVIS_BRANCH == 'master' ]]; then cd $TRAVIS_BUILD_DIR/docs; mkdocs build -d site; fi
after_success:
- mv .coverage ../.coverage.empty
- cd ..
- coverage combine
- codecov
- if [[ $TRAVIS_PYTHON_VERSION == '3.5' && $TRAVIS_BRANCH == 'master' ]]; then bash $TRAVIS_BUILD_DIR/.travis-update-gh-pages.sh ; fi