forked from dask/distributed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
91 lines (81 loc) · 2.92 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
language: python
sudo: false
services:
- docker
matrix:
fast_finish: true
include:
- python: "2.7"
- python: "3.4"
env: COVERAGE=true
- python: "3.5"
- python: "2.7"
env: HDFS=true
sudo: true
dist: trusty
- python: "3.5"
env: HDFS=true
sudo: true
dist: trusty
addons:
hosts:
# Need to make the container's hostname resolvable, since the HDFS
# client will contact it back.
- hdfs-container
before_install:
- |
if [[ $HDFS == true ]]; then
pushd continuous_integration
docker build -t distributed-hdfs-test .
# Run HDFS
./run-hdfs.sh || exit 1
popd
fi;
install:
# Note we disable progress bars to make Travis log loading much faster
# Install conda
- wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
# Install dependencies
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION
- source activate test-environment
- conda install -q pytest pytest-timeout coverage tornado toolz dill futures dask ipywidgets psutil bokeh requests joblib mock ipykernel jupyter_client h5py netcdf4 lz4 paramiko tblib click -c conda-forge
- |
if [[ $HDFS == true ]]; then
conda install -q libxml2 krb5 boost
conda install -q -c conda-forge libhdfs3 libgsasl libntlm
pip install -q git+https://github.com/dask/hdfs3 --upgrade
fi;
- pip install -q git+https://github.com/dask/dask.git --upgrade
- pip install -q git+https://github.com/joblib/joblib.git --upgrade
- pip install -q git+https://github.com/dask/s3fs.git --upgrade
- pip install -q git+https://github.com/dask/zict.git --upgrade
- pip install -q sortedcollections msgpack-python
- if [[ $PYTHON == '3.5' ]]; then pip install git+https://github.com/jcrist/crick.git; fi
# Install distributed
- pip install --no-deps -e .
script:
- export PYTEST_OPTIONS="--verbose -r s --timeout-method=thread --timeout=300 --runslow --durations=20"
- |
if [[ $HDFS == true ]]; then
py.test distributed/tests/test_hdfs.py $PYTEST_OPTIONS
if [ $? -ne 0 ]; then
# Diagnose test error
echo "--"
echo "-- HDFS namenode log follows"
echo "--"
docker exec -it $(docker ps -q) bash -c "tail -n50 /usr/local/hadoop/logs/hadoop-root-namenode-hdfs-container.log"
(exit 1)
fi
elif [[ $COVERAGE == true ]]; then
coverage run $(which py.test) distributed -m "not avoid_travis" $PYTEST_OPTIONS;
else
py.test -m "not avoid_travis" distributed $PYTEST_OPTIONS;
fi;
after_success:
- if [[ $COVERAGE == true ]]; then coverage report; pip install -q coveralls ; coveralls ; fi
notifications:
email: false