-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
157 lines (157 loc) · 7.09 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
# http://travis-ci.org/#!/jupyter-contrib/jupyter_nbextensions_configurator
language: python
sudo: false
addons:
firefox: latest
matrix:
fast_finish: true
# Use the built-in venv for linux builds
# 3.5 as it isn't installed by default. Let tox handle other versions.
include:
# packaging sanity check
- os: linux
python: '3.4'
env: TOXENV=check
# python linting
- os: linux
python: '3.4'
env: TOXENV=lint
# check that conda build/install works
- os: linux
python: '3.4'
env: TOXENV=condarecipe
# linux, various python and notebook versions
- os: linux
python: '2.7'
env: TOXENV=py27-notebook
- os: linux
python: '3.3'
env: TOXENV=py33-notebook
- os: linux
python: '3.4'
env: TOXENV=py34-notebook40
- os: linux
python: '3.4'
env: TOXENV=py34-notebook41
- os: linux
python: '3.4'
env: TOXENV=py34-notebook42
- os: linux
python: '3.4'
env: TOXENV=py34-notebook43
- os: linux
python: '3.4'
env: TOXENV=py34-notebook44
- os: linux
python: '3.5'
env: TOXENV=py35-notebook
- os: linux
python: '3.6'
env: TOXENV=py36-notebook
- os: linux
python: 'pypy'
env: TOXENV=pypy-notebook
# jupyterhub tests
- os: linux
python: '3.4'
env: TOXENV=jupyterhub
# OSX tests, python 2 & 3
# Use generic language on osx, get python via terryfy during before_install
- os: osx
language: generic
env: OSX_PYTHON=2.7 TOXENV=py27-notebook
- os: osx
language: generic
env: OSX_PYTHON=3.5 TOXENV=py35-notebook
# finally, appveyor downloads from windows platform
- os: linux
python: '3.4'
env: TOXENV=appveyorartifacts
allow_failures:
- env: TOXENV=appveyorartifacts
- env: TOXENV=lint
- env: TOXENV=pypy-notebook
env:
global:
- LD_PRELOAD=/lib/x86_64-linux-gnu/libSegFault.so
- SEGFAULT_SIGNALS=all
before_install:
- uname -a
- id -un
- id -Gn
# install python on osx
- 'if [[ ${OSX_PYTHON} ]]; then curl https://raw.githubusercontent.com/MacPython/terryfy/12a4641c4e922eb4a63c82732df8d0c5045430af/travis_tools.sh > travis_tools.sh; fi'
- 'if [[ ${OSX_PYTHON} ]]; then source travis_tools.sh; fi'
- 'if [[ ${OSX_PYTHON} ]]; then get_python_environment macpython $OSX_PYTHON venv; fi'
# install 3.4 as it's the default for tox environments like clean, check
- 'if [[ ${OSX_PYTHON} ]] && [[ ${OSX_PYTHON} != "3.4" ]]; then install_macpython 3.4; fi'
# check which python installs are present/active
- 'if [[ ${OSX_PYTHON} ]]; then echo "\$PYTHON_EXE=$PYTHON_EXE"; fi;'
- 'if [[ ${OSX_PYTHON} ]]; then if [[ $(which python ) ]]; then ls -l $(which python ); else echo "missing"; fi; fi'
- 'if [[ ${OSX_PYTHON} ]]; then if [[ $(which python2.7) ]]; then ls -l $(which python2.7); else echo "missing"; fi; fi'
- 'if [[ ${OSX_PYTHON} ]]; then if [[ $(which python3.3) ]]; then ls -l $(which python3.3); else echo "missing"; fi; fi'
- 'if [[ ${OSX_PYTHON} ]]; then if [[ $(which python3.4) ]]; then ls -l $(which python3.4); else echo "missing"; fi; fi'
- 'if [[ ${OSX_PYTHON} ]]; then if [[ $(which python3.5) ]]; then ls -l $(which python3.5); else echo "missing"; fi; fi'
# stuff for conda recipe
# Note we're currently installing 4.3.11 specifically, since conda 4.3.14-16
# have a bug which stop them intalling anything on travis (see
# https://github.com/conda/conda/issues/5033
# for details).
# This has been fixed in mewer conda versions
# (>=4.3.17), but the current 'latest' installer is still 4.3.14, so we need to specify the
# previous version. This should change in future once an installer for
# >=4.3.17 is released!
- 'if [[ ${TOXENV} == "condarecipe" ]]; then wget https://repo.continuum.io/miniconda/Miniconda3-4.3.11-Linux-x86_64.sh -O miniconda.sh; fi'
- 'if [[ ${TOXENV} == "condarecipe" ]]; then bash miniconda.sh -b -p $HOME/miniconda; fi'
- 'if [[ ${TOXENV} == "condarecipe" ]]; then export PATH="$HOME/miniconda/bin:$PATH"; fi'
- 'if [[ ${TOXENV} == "condarecipe" ]]; then hash -r; fi'
- 'if [[ ${TOXENV} == "condarecipe" ]]; then conda config --set always_yes yes --set changeps1 no; fi'
- 'if [[ ${TOXENV} == "condarecipe" ]]; then conda info -a; fi # Useful for debugging any issues with conda'
# update conda, this should skip over the problematic 4.3.14-4.3.16 anyway
- 'if [[ ${TOXENV} == "condarecipe" ]]; then conda update conda; fi'
- 'if [[ ${TOXENV} == "condarecipe" ]]; then conda install conda-build; fi'
- 'if [[ ${TOXENV} == "condarecipe" ]]; then conda info -a; fi # Useful for debugging any issues with conda'
- 'if [[ ${TOXENV} == "condarecipe" ]]; then git fetch --unshallow; fi'
# also install npm configurable proxy for jupyterhub!
- 'if [[ ${TOXENV} == "jupyterhub" ]]; then npm install -g configurable-http-proxy; fi;'
# decide whether js tests will run
- 'if [[ ${TRAVIS_OS_NAME} == "linux" ]] && [[ ${TOXENV} == py* || ${TOXENV} == jupyterhub ]]; then JS_TESTS="true"; else JS_TESTS="false"; fi;'
- 'echo "\${JS_TESTS}=$JS_TESTS";'
# for js tests (which we do on linux only), selenium 3 requires geckodriver
- 'if [[ ${JS_TESTS} == "true" ]]; then GECKODRIVER_VERSION="0.16.1"; fi;'
- 'if [[ ${JS_TESTS} == "true" ]]; then wget "https://github.com/mozilla/geckodriver/releases/download/v$GECKODRIVER_VERSION/geckodriver-v$GECKODRIVER_VERSION-linux64.tar.gz"; fi;'
- 'if [[ ${JS_TESTS} == "true" ]]; then mkdir geckodriver; fi;'
- 'if [[ ${JS_TESTS} == "true" ]]; then tar -xzf "geckodriver-v$GECKODRIVER_VERSION-linux64.tar.gz" -C geckodriver; fi;'
- 'if [[ ${JS_TESTS} == "true" ]]; then export PATH="$PATH:$PWD/geckodriver"; fi;'
# remove the downloaded archive, don't care if this fails
- 'if [[ ${JS_TESTS} == "true" ]]; then rm "geckodriver-v$GECKODRIVER_VERSION-linux64.tar.gz" || true; fi;'
# from https://docs.travis-ci.com/user/gui-and-headless-browsers/#Using-xvfb-to-Run-Tests-That-Require-a-GUI
# we need to start xvfb for selenium to work correctly
- 'if [[ ${JS_TESTS} == "true" ]]; then export DISPLAY=":99.0"; fi;'
- 'if [[ ${JS_TESTS} == "true" ]]; then sh -e /etc/init.d/xvfb start && sleep 3; fi;'
install:
- pip install tox
- virtualenv --version
- firefox --version
script:
- 'if [[ ${TOXENV} != "condarecipe" ]]; then tox -v -e ${TOXENV}; fi'
# don't actually use tox for condarecipe :S
- 'if [[ ${TOXENV} == "condarecipe" ]]; then conda config --append channels conda-forge; fi'
- 'if [[ ${TOXENV} == "condarecipe" ]]; then conda config --get channels; fi'
- 'if [[ ${TOXENV} == "condarecipe" ]]; then conda build conda.recipe/; fi'
- 'if [[ ${TOXENV} == "condarecipe" ]]; then conda install --use-local jupyter_nbextensions_configurator; fi'
after_script:
# test if TOXENV not in set
# see http://unix.stackexchange.com/a/111518
- 'if ! [[ ${TOXENV} =~ ^(appveyorartifacts|check|lint|condarecipe)$ ]]; then tox -e coveralls,codecov; fi'
after_failure:
- more .tox/log/* | cat
- more .tox/*/log/* | cat
after_success:
before_cache:
- rm -rf $HOME/.cache/pip/log
cache:
directories:
- $HOME/.cache/pip
notifications:
email: false