forked from holoviz/holoviews
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
84 lines (76 loc) · 3.52 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
language: python
sudo: false
python:
- "2.7"
- "3.4"
notifications:
email:
on_failure: change # [always|never|change] default: always
install:
- SITE_PACKAGES=`pip --version | cut -d ' ' -f 4`
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-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
- conda update -q conda
# Useful for debugging any issues with conda
- conda info -a
- conda create -q -c scitools -n test-environment python=$TRAVIS_PYTHON_VERSION scipy numpy freetype nose matplotlib bokeh pandas jupyter ipython=4.2.0 param iris xarray pyqt=4.11
- source activate test-environment
- if [[ "$TRAVIS_PYTHON_VERSION" == "3.4" ]]; then
conda install python=3.4.3;
fi
- rm -r $SITE_PACKAGES/numpy*
- python setup.py install
- pip install git+git://github.com/ioam/param.git
- pip install path.py
- pip install coveralls awscli
- if [ "$TRAVIS_PULL_REQUEST" == 'false' ]; then
echo "Attempting to find any associated pull request";
CURRENT_BUILD=$(curl -s -X GET "https://api.travis-ci.org/repos/ioam/holoviews/builds?number=$TRAVIS_BUILD_NUMBER");
NEXT_BUILD=$(curl -s -X GET "https://api.travis-ci.org/repos/ioam/holoviews/builds?number=$((TRAVIS_BUILD_NUMBER + 1))");
MSG1=$(echo $CURRENT_BUILD | jq '.[].message' );
MSG2=$(echo $NEXT_BUILD | jq '.[].message' );
if [ "$MSG1" == "$MSG2" ] ; then
BUILD_ID=$(echo $NEXT_BUILD | jq .[].id);
TRAVIS_PULL_REQUEST=$(curl -s -X GET "https://api.travis-ci.org/repos/ioam/holoviews/builds/$BUILD_ID" | jq .compare_url | cut -d '/' -f7 | cut -d \" -f1);
echo "Associated pull request found - PR $TRAVIS_PULL_REQUEST";
fi
fi
- REF_DATA_BRANCH=${TRAVIS_PULL_REQUEST//false/reference_data}
- git clone https://github.com/ioam/holoviews-data.git -b reference_data ./doc/reference_data
- cd ./doc/reference_data
- echo "Attempting to checkout $REF_DATA_BRANCH branch"
- if [ $(git branch -a --list *origin/$REF_DATA_BRANCH | wc -l) -eq 1 ] ; then
git checkout $REF_DATA_BRANCH;
else
echo "Using the master branch reference data";
fi
- cd ../..
before-script:
- "echo 'backend : Agg' > $HOME/.matplotlib/matplotlibrc"
script:
- nosetests --with-doctest --with-coverage --cover-package=holoviews -a '!optional'
- cd doc/nbpublisher; chmod +x test_notebooks.py; ./test_notebooks.py
- chmod +x concat_html.py; ./concat_html.py ../test_data ../test_html
- cd ../../; mv doc/Tutorials/.coverage ./.coverage.notebooks
- coverage combine --append
after_script:
- if [ "$TRAVIS_BRANCH" == 'master' ]; then
cd doc/test_data;
zip -r test_data.zip *;
aws s3 cp --region eu-west-1 ./test_data.zip "s3://preview.holoviews.org/$TRAVIS_BUILD_NUMBER/test_data_py${TRAVIS_PYTHON_VERSION:0:1}.zip";
cd -;
fi
- aws s3 cp --recursive --region eu-west-1 ./doc/test_html "s3://travis.holoviews.org/build_$TRAVIS_BUILD_NUMBER"
- curl -s -X GET "https://kq5y73i0xe.execute-api.eu-west-1.amazonaws.com/dev/travis-holoviews-index"
- echo insecure >> ~/.curlrc
- if [ "$TRAVIS_PULL_REQUEST" != 'false' ]; then
curl -X POST -d "$TRAVIS_BUILD_NUMBER" "https://kq5y73i0xe.execute-api.eu-west-1.amazonaws.com/dev/pr-status";
fi
after_success: coveralls