This repository has been archived by the owner on Mar 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
.travis.yml
56 lines (55 loc) · 2.22 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
# language: python sets up virtualenv and pip that we don't need.
# omitting language gives us ruby stuff. c seems likely to be a minimal setup.
language: c
env:
- TRAVIS_PYTHON_VERSION=2.7 TEST_TARGET=tests
- TRAVIS_PYTHON_VERSION=3.4 TEST_TARGET=tests
- TRAVIS_PYTHON_VERSION=3.5 TEST_TARGET=tests
- TRAVIS_PYTHON_VERSION=3.6 TEST_TARGET=tests
- TRAVIS_PYTHON_VERSION=3.6 TEST_TARGET=packaging
os:
- linux
- osx
matrix:
exclude:
- os: osx
env: TRAVIS_PYTHON_VERSION=3.5 TEST_TARGET=packaging
install:
- printenv | sort
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
MINICONDA_VERSION=2 ;
else
MINICONDA_VERSION=3 ;
fi ;
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
MINICONDA_OS=Linux ;
else
MINICONDA_OS=MacOSX ;
fi ;
echo "Fetching Python $MINICONDA_VERSION miniconda for $MINICONDA_OS" ;
wget https://repo.continuum.io/miniconda/Miniconda$MINICONDA_VERSION-4.1.11-$MINICONDA_OS-x86_64.sh -O miniconda.sh
- bash miniconda.sh -b -p "$HOME"/miniconda
- source "$HOME"/miniconda/bin/activate root
- printenv | sort
- conda config --set always_yes yes --set changeps1 no --set auto_update_conda false
- conda install -n root conda-build psutil
- conda info -a
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
OS_PACKAGES=libffi ;
fi ;
conda create -q -n test-environment python="$TRAVIS_PYTHON_VERSION" pip redis pycrypto bcrypt notebook bokeh ruamel_yaml anaconda-client requests psutil $OS_PACKAGES
- source activate test-environment
- printenv | sort
- unset CONDA_ENV_PATH # because the older conda in miniconda sets this, confusing some tests
- export PATH=`echo "$PATH" | sed -e s@"$HOME"/miniconda/bin:@@g`
- printenv | sort
- pip install coverage flake8==2.6.2 pep257 pytest pytest-cov yapf==0.6.2 beautifulsoup4 tornado pytest-xdist
- conda install -y -q -c conda-forge keyring
script:
- if test "$TEST_TARGET" = tests; then LANG=en_US.UTF-8 python setup.py test; fi
- if test "$TRAVIS_PYTHON_VERSION" = "3.5" && test "$TEST_TARGET" = "packaging"; then
git fetch --unshallow ;
LANG=en_US.UTF-8 python setup.py conda_package ;
else
echo "Not building packages on $TRAVIS_PYTHON_VERSION target=$TEST_TARGET" ;
fi