forked from eqcorrscan/EQcorrscan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
182 lines (172 loc) · 4.75 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
<<<<<<< HEAD
language: python
os:
- linux
# - osx # Note, travis doesn't support python builds on osx
python: "2.7"
virtualenv:
system_site_packages: true
=======
language: c
matrix:
include:
- os: linux
env: PYTHON_VERSION=2.7
- os: linux
env: PYTHON_VERSION=3.5
# Conda install on OSX is an issue - gives 0.238 xcorr when should give 1...
# - os: osx
# env: PYTHON_VERSION=2.7
# - os: osx
# env: PYTHON_VERSION=3.5
>>>>>>> upstream/master
sudo: false
# Test with multiple obspy versions, allow some backwards compatability
env:
<<<<<<< HEAD
- OBSPY_VERSION=0.10.2
- OBSPY_VERSION=1.0.0
addons:
apt:
source:
- lucid
packages:
# - python-opencv
- pandoc
# before install:
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install pandoc; fi
=======
global:
- OBSPY_VERSION=1.0.1
>>>>>>> upstream/master
install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
export OS="MacOSX";
export py=$PYTHON_VERSION;
else
export OS="Linux";
export py=$TRAVIS_PYTHON_VERSION;
fi
<<<<<<< HEAD
=======
- if [[ "$py" == "2.7_with_system_site_packages" ]]; then
export py="2.7";
fi
>>>>>>> upstream/master
- if [[ "${py:0:1}" == '2' ]]; then
wget https://repo.continuum.io/miniconda/Miniconda-latest-${OS}-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-${OS}-x86_64.sh -O miniconda.sh;
fi
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
<<<<<<< HEAD
=======
- conda config --add channels menpo
>>>>>>> upstream/master
- conda update -q conda
# Useful for debugging any issues with conda
- conda info -a
- |
<<<<<<< HEAD
if [[ "${py:0:1}" == '3' ]]; then
NUMPY_VERSION=1.9.2
SCIPY_VERSION=0.16.0
MPL_VERSION=1.4.3
BASEMAP_VERSION=1.0.7
else
NUMPY_VERSION=1.8.2
SCIPY_VERSION=0.14.0
MPL_VERSION=1.3.1
BASEMAP_VERSION=1.0.7
fi
- conda create -q -n test-environment
python=$py
numpy=$NUMPY_VERSION
scipy=$SCIPY_VERSION
matplotlib=$MPL_VERSION
basemap=$BASEMAP_VERSION
flake8
future
lxml
sqlalchemy
mock
gdal
pyproj
docopt
coverage
requests
pytest
pytest-pep8
opencv
pyflakes=0.9.0
- source activate test-environment
# install packages not available via conda
# - pip install -r requirements.txt
- pip install coveralls
- pip install geographiclib
- pip install pypandoc
# current pyimgur stable release has a py2.6 incompatibility
- pip install https://github.com/megies/PyImgur/archive/py26.zip
- pip install obspy==$OBSPY_VERSION
=======
if [[ "${py:0:1}" == "3" ]]; then
env_file="misc/py35_test_env.lis"
PYFLAKES="pyflakes=1.0.0"
else
env_file="misc/py2_test_env.lis"
PYFLAKES="pyflakes=0.9.0"
fi
- |
if [[ "$OS" == "MacOSX" ]]; then
conda create -q -n test-environment python=$PYTHON_VERSION numpy scipy matplotlib basemap pyproj flake8 future lxml decorator sqlalchemy mock nose gdal docopt coverage requests
else
conda create -q -n test-environment --file $env_file
fi
- source activate test-environment
- conda install $PYFLAKES
- conda install pyproj
- |
if [[ "${py:0:1}" == "3" ]] && [[ "$OS" == "MacOSX" ]]; then
conda install -c menpo opencv3=3.1.0
elif [[ "$OS" == "MacOSX" ]]; then
conda install opencv
fi
- pip install coveralls
- pip install geographiclib
- pip install https://github.com/megies/PyImgur/archive/py3.zip
- pip install pep8-naming
- pip install pytest
- pip install pytest-cov
- pip install obspy==$OBSPY_VERSION
# - pip install obspy==$OBSPY_VERSION
>>>>>>> upstream/master
- pip freeze
- conda list
# done installing dependencies
- git version
- pip install .
script:
<<<<<<< HEAD
# Run the tests available, more should be added
# - python eqcorrscan/tests/install_test.py
# py.test
python setup.py test
=======
python setup.py test
after_success:
# Check how much code is actually tested and send this report to coveralls
- coverage combine
- coveralls
>>>>>>> upstream/master
notifications:
email: false
webhooks:
urls:
- https://webhooks.gitter.im/e/10122f10ed5043c58ae7
on_success: change # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: never # options: [always|never|change] default: always