forked from modflowpy/flopy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
106 lines (96 loc) · 3.27 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
language: python
os: linux
dist: trusty
sudo: required
compiler: gcc
matrix:
include:
- python: 2.7
- python: 3.4
- python: 3.5
- python: 3.6
- python: "3.6-dev"
- python: "nightly"
allow_failures:
- python: "3.6-dev"
- python: "3.7-dev"
- python: "nightly"
cache:
pip: true
directories:
- $HOME/.cache/pip
- $HOME/.local
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gfortran-6
- g++-6
- python-pip
- libhdf5-serial-dev
- netcdf-bin
- libnetcdf-dev
- gdal-bin
- libgdal-dev
env:
global:
- NO_NET=1
# start Virtual X, so default matplotlib backend works
before_install:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
# command to install dependencies
install:
- if [[ ! -d "$HOME/.local/bin" ]]; then
mkdir "$HOME/.local/bin";
fi
- export PATH="$HOME/.local/bin:$PATH"
- ln -fs /usr/bin/gfortran-6 "$HOME/.local/bin/gfortran" && gfortran --version
- ls -l /usr/bin/gfortran-6
- ln -fs /usr/bin/gcc-6 "$HOME/.local/bin/gcc" && gcc --version
- ls -l /usr/bin/gcc-6
- ln -fs /usr/bin/g++-6 "$HOME/.local/bin/g++" && g++ --version
- ls -l /usr/bin/g++-6
- export CXX="g++"
- if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then
pip install -r requirements2-34.travis.txt;
pip install requests;
echo requests version1; python -c "import requests; print(requests.__version__)";
fi
- if [[ $TRAVIS_PYTHON_VERSION == 3.4 ]];
then pip install -r requirements2-34.travis.txt;
fi
- if [[ $TRAVIS_PYTHON_VERSION > 3.4 ]];
then pip install -r requirements.travis.txt;
fi
- pip install https://github.com/modflowpy/pymake/zipball/master
- pip install --upgrade jupyter
- pip install nbconvert
- pip install nose-timer
- pip install coveralls
- pip install pylint
# command to run tests
script:
- export PYTHONPATH=$PYTHONPATH:.
- echo python path; python -c "from __future__ import print_function; import sys; print(sys.path)"
- python -c "import os; is_travis = 'TRAVIS' in os.environ; print('TRAVIS {}'.format(is_travis))"
- echo flopy version; python -c "from __future__ import print_function; import flopy; print(flopy.__version__)"
- echo numpy version; python -c "import numpy; print(numpy.version.version)"
- echo pandas version; python -c "import pandas as pd; print(pd.__version__)"
- echo pyshp; python -c "import shapefile; print(shapefile.__version__)"
- echo nosetests version; nosetests --version
- echo jupyter version; jupyter --version
- echo jupyter runtime directory; jupyter --runtime-dir
- echo pylint version; pylint --version
- nosetests -v build_exes.py --with-id --with-timer -w ./autotest
- if [[ $TRAVIS_PYTHON_VERSION == 3.6 ]]; then
nosetests -v autotest_notebooks.py --with-id --with-timer -w ./autotest --with-coverage --cover-package=flopy;
nosetests -v autotest_scripts.py --with-id --with-timer -w ./autotest --with-coverage --cover-package=flopy;
fi
- nosetests -v --with-id --with-timer -w ./autotest --with-coverage --cover-package=flopy
after_success:
- coveralls
- if [[ $TRAVIS_PYTHON_VERSION == 3.5 ]]; then
pylint --errors-only ./flopy;
fi