Skip to content

Commit a9969ec

Browse files
committed
Update CI settings
1 parent 6c4a085 commit a9969ec

File tree

2 files changed

+109
-7
lines changed

2 files changed

+109
-7
lines changed

.travis.yml

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# http://travis-ci.org/#!/jupyter-contrib/jupyter_nbextensions_configurator
2+
language: python
3+
sudo: false
4+
addons:
5+
firefox: latest
6+
dist: trusty
7+
matrix:
8+
fast_finish: true
9+
# Use the built-in venv for linux builds
10+
# 3.5 as it isn't installed by default. Let tox handle other versions.
11+
include:
12+
# python linting
13+
- os: linux
14+
python: '3.6'
15+
env: TOXENV=lint
16+
# check that conda build/install works
17+
- os: linux
18+
python: '3.7'
19+
env: TOXENV=condarecipe
20+
# linux, various python and notebook versions
21+
- os: linux
22+
python: '2.7'
23+
env: TOXENV=py27-notebook
24+
- os: linux
25+
python: '3.6'
26+
env: TOXENV=py36-notebook
27+
- os: linux
28+
python: '3.7'
29+
env: TOXENV=py37-notebook
30+
- os: linux
31+
python: '3.8'
32+
env: TOXENV=py37-notebook
33+
- os: linux
34+
python: 'pypy'
35+
env: TOXENV=pypy-notebook
36+
allow_failures:
37+
- env: TOXENV=lint
38+
- env: TOXENV=pypy-notebook
39+
- env: TOXENV=py36-notebook
40+
env:
41+
global:
42+
- LD_PRELOAD=/lib/x86_64-linux-gnu/libSegFault.so
43+
- SEGFAULT_SIGNALS=all
44+
before_install:
45+
- uname -a
46+
- id -un
47+
- id -Gn
48+
# stuff for conda recipe
49+
- 'if [[ ${TOXENV} == "condarecipe" ]]; then wget https://repo.anaconda.com/miniconda/Miniconda3-4.7.12.1-Linux-x86_64.sh -O miniconda.sh; fi'
50+
- 'if [[ ${TOXENV} == "condarecipe" ]]; then ( echo "bfe34e1fa28d6d75a7ad05fd02fa5472275673d5f5621b77380898dee1be15d2 miniconda.sh" | sha256sum -c - ); fi'
51+
- 'if [[ ${TOXENV} == "condarecipe" ]]; then bash miniconda.sh -b -p $HOME/miniconda; fi'
52+
- 'if [[ ${TOXENV} == "condarecipe" ]]; then export PATH="$HOME/miniconda/bin:$PATH"; fi'
53+
- 'if [[ ${TOXENV} == "condarecipe" ]]; then hash -r; fi'
54+
- 'if [[ ${TOXENV} == "condarecipe" ]]; then conda config --set always_yes yes --set changeps1 no; fi'
55+
- 'if [[ ${TOXENV} == "condarecipe" ]]; then conda info -a; fi # Useful for debugging any issues with conda'
56+
# update conda
57+
- 'if [[ ${TOXENV} == "condarecipe" ]]; then conda update --all; fi'
58+
- 'if [[ ${TOXENV} == "condarecipe" ]]; then conda install conda-build; fi'
59+
- 'if [[ ${TOXENV} == "condarecipe" ]]; then conda info -a; fi # Useful for debugging any issues with conda'
60+
- 'if [[ ${TOXENV} == "condarecipe" ]]; then git fetch --unshallow; fi'
61+
# also install npm configurable proxy for jupyterhub!
62+
- 'if [[ ${TOXENV} == "jupyterhub" ]]; then npm install -g configurable-http-proxy; fi;'
63+
# decide whether js tests will run
64+
- 'if [[ ${TRAVIS_OS_NAME} == "linux" ]] && [[ ${TOXENV} == py* || ${TOXENV} == jupyterhub ]]; then JS_TESTS="true"; else JS_TESTS="false"; fi;'
65+
- 'echo "\${JS_TESTS}=$JS_TESTS";'
66+
# for js tests (which we do on linux only), selenium 3 requires geckodriver
67+
- 'if [[ ${JS_TESTS} == "true" ]]; then GECKODRIVER_VERSION="0.16.1"; fi;'
68+
- 'if [[ ${JS_TESTS} == "true" ]]; then wget "https://github.com/mozilla/geckodriver/releases/download/v$GECKODRIVER_VERSION/geckodriver-v$GECKODRIVER_VERSION-linux64.tar.gz"; fi;'
69+
- 'if [[ ${JS_TESTS} == "true" ]]; then mkdir geckodriver; fi;'
70+
- 'if [[ ${JS_TESTS} == "true" ]]; then tar -xzf "geckodriver-v$GECKODRIVER_VERSION-linux64.tar.gz" -C geckodriver; fi;'
71+
- 'if [[ ${JS_TESTS} == "true" ]]; then export PATH="$PATH:$PWD/geckodriver"; fi;'
72+
# remove the downloaded archive, don't care if this fails
73+
- 'if [[ ${JS_TESTS} == "true" ]]; then rm "geckodriver-v$GECKODRIVER_VERSION-linux64.tar.gz" || true; fi;'
74+
# from https://docs.travis-ci.com/user/gui-and-headless-browsers/#Using-xvfb-to-Run-Tests-That-Require-a-GUI
75+
# we need to start xvfb for selenium to work correctly
76+
- 'if [[ ${JS_TESTS} == "true" ]]; then export DISPLAY=":99.0"; fi;'
77+
- 'if [[ ${JS_TESTS} == "true" ]]; then sh -e /etc/init.d/xvfb start && sleep 3; fi;'
78+
install:
79+
- python -m pip install tox
80+
- virtualenv --version
81+
- firefox --version
82+
script:
83+
- 'if [[ ${TOXENV} != "condarecipe" ]]; then tox -v -e ${TOXENV}; fi'
84+
# don't actually use tox for condarecipe :S
85+
- 'if [[ ${TOXENV} == "condarecipe" ]]; then conda config --append channels conda-forge; fi'
86+
- 'if [[ ${TOXENV} == "condarecipe" ]]; then conda config --get channels; fi'
87+
- 'if [[ ${TOXENV} == "condarecipe" ]]; then conda build conda.recipe/; fi'
88+
- 'if [[ ${TOXENV} == "condarecipe" ]]; then conda install --use-local jupyter_nbextensions_configurator; fi'
89+
after_script:
90+
# test if TOXENV not in set
91+
# see http://unix.stackexchange.com/a/111518
92+
- 'if ! [[ ${TOXENV} =~ ^(appveyorartifacts|check|lint|condarecipe)$ ]]; then tox -e coveralls,codecov; fi'
93+
after_failure:
94+
- more .tox/log/* | cat
95+
- more .tox/*/log/* | cat
96+
after_success:
97+
before_cache:
98+
- rm -rf $HOME/.cache/pip/log
99+
cache:
100+
directories:
101+
- $HOME/.cache/pip
102+
notifications:
103+
email: false

tox.ini

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,15 @@ envlist =
66
clean,
77
check,
88
lint,
9-
py39-notebook{57,65},
10-
py39-notebook,
9+
py36-notebook{57,65},
10+
py36-notebook,
1111
report,
1212

1313
[testenv]
1414
basepython =
1515
pypy: {env:TOXPYTHON:pypy}
16-
py39: {env:TOXPYTHON:python3.9}
17-
py310: {env:TOXPYTHON:python3.10}
18-
{docs,spell}: {env:TOXPYTHON:python3.10}
16+
py36: {env:TOXPYTHON:python3.6}
17+
{docs,spell}: {env:TOXPYTHON:python3.6}
1918
setenv =
2019
PYTHONPATH={toxinidir}/tests
2120
PYTHONUNBUFFERED=yes
@@ -26,8 +25,8 @@ deps =
2625
jupyterhub: jupyterhub>=2.3.1
2726
mock
2827
nose
29-
notebook57: notebook>=5.7,<5.8
30-
notebook64: notebook>=6.4,<6.5
28+
notebook57: notebook==5.7
29+
notebook64: notebook==6.4
3130
notebookmaster: https://github.com/jupyter/notebook/archive/master.zip
3231
notebook: notebook
3332
requests

0 commit comments

Comments
 (0)