forked from yt-project/yt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
131 lines (117 loc) · 3.89 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
language: python
sudo: required
cache:
pip: true
directories:
- $HOME/.ccache # https://github.com/travis-ci/travis-ci/issues/5853
addons:
apt:
packages:
- libhdf5-serial-dev
env:
global:
NUMPY=numpy
CYTHON=cython
MATPLOTLIB=matplotlib
SYMPY=sympy
H5PY=h5py
SCIPY=scipy
IPYTHON=ipython
FASTCACHE=fastcache
FLAKE8=flake8
CODECOV=codecov
COVERAGE=coverage
PANDAS=pandas
MOCK=mock
NOSETIMER=nose-timer
REQUESTS=requests
before_install:
- |
if [[ $TRAVIS_OS_NAME != 'osx' ]]; then
pip install --upgrade virtualenv
python -m virtualenv venv
source venv/bin/activate
export PATH=/usr/lib/ccache:$PATH
else
brew update
brew install ccache hdf5
export PATH=/usr/local/opt/ccache/libexec:$PATH
fi
mkdir -p $HOME/.config/yt
echo "[yt]" > $HOME/.config/yt/ytrc
echo "suppressStreamLogging = True" >> $HOME/.config/yt/ytrc
cat $HOME/.config/yt/ytrc
cp tests/matplotlibrc .
install:
- |
# setup environment
ccache -s
# Upgrade pip and setuptools and wheel to get clean install
pip install --upgrade pip
pip install --upgrade wheel
pip install --upgrade setuptools
# Install dependencies
pip install $MOCK $NUMPY $SCIPY $H5PY $CYTHON $MATPLOTLIB $SYMPY $FASTCACHE $IPYTHON $FLAKE8 $CODECOV $COVERAGE $PANDAS $NOSE $NOSETIMER $REQUESTS
# install yt
if [[ $TRAVIS_BUILD_STAGE_NAME != "Lint" ]]; then
pip install -e .
fi
jobs:
include:
- stage: lint
python: 3.6
env: MOCK= NOSETIMER= NOSE= CODECOV= COVERAGE= NUMPY= CYTHON= MATPLOTLIB= SYMPY= H5PY= SCIPY= FASTCACHE= IPYTHON= PANDAS= REQUESTS=
script: flake8 yt/
- stage: lint
python: 2.7
env: MOCK= NOSETIMER= NOSE= CODECOV= COVERAGE= NUMPY= CYTHON= MATPLOTLIB= SYMPY= H5PY= SCIPY= FASTCACHE= IPYTHON= PANDAS= REQUESTS=
script: flake8 yt/
- stage: tests
name: "Python: 2.7 Unit Tests"
python: 2.7
env: NUMPY=numpy==1.10.4 CYTHON=cython==0.24 MATPLOTLIB=matplotlib==1.5.3 SYMPY=sympy==1.0 H5PY= SCIPY= FASTCACHE= FLAKE8= IPYTHON=ipython==1.0 REQUESTS=
script: coverage run $(which nosetests) -c nose_unit.cfg
- stage: tests
name: "Python: 2.7 Unit Tests"
python: 2.7
env: FLAKE8= REQUESTS=
script: coverage run $(which nosetests) -c nose_unit.cfg
- stage: tests
name: "Python: 3.5 Unit Tests"
python: 3.5
env: FLAKE8= REQUESTS=
script: coverage run $(which nosetests) -c nose_unit.cfg
- stage: tests
name: "Python: 3.6 Unit Tests"
python: 3.6
env: FLAKE8= REQUESTS=
script: coverage run $(which nosetests) -c nose_unit.cfg
- stage: tests
name: "Python: 2.7 Answer Tests"
python: 2.7
env: NUMPY=numpy==1.10.4 CYTHON=cython==0.24 MATPLOTLIB=matplotlib==1.5.3 SYMPY=sympy==1.0 H5PY= SCIPY= FASTCACHE= FLAKE8= IPYTHON=ipython==1.0
script: coverage run $(which nosetests) -c nose_answer.cfg
after_failure: python tests/report_failed_answers.py -f -m --xunit-file "answer_nosetests.xml"
- stage: tests
name: "Python: 3.6 Answer Tests"
python: 3.6
env: FLAKE8=
script: coverage run $(which nosetests) -c nose_answer.cfg
after_failure: python tests/report_failed_answers.py -f -m --xunit-file "answer_nosetests.xml"
- stage: tests
name: "Xcode: xcode7.3 Unit Tests"
os: osx
osx_image: xcode7.3
language: generic # https://github.com/travis-ci/travis-ci/issues/2312
cache:
pip: false
directories:
- $HOME/Library/Caches/pip
# `cache` does not support `env`-like `global` so copy-paste from top
- $HOME/.ccache # https://github.com/travis-ci/travis-ci/issues/5853
script: coverage run $(which nosetests) -c nose_unit.cfg
after_success:
- |
if [[ $TRAVIS_BUILD_STAGE_NAME != "Lint" ]]; then
codecov
fi