forked from vega/altair
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
62 lines (55 loc) · 1.78 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
language: python
sudo: required
python:
- 2.7
- 3.4
- 3.5
env:
matrix:
- BUILD="test" INSTALL="conda"
- BUILD="test" INSTALL="pip"
matrix:
include:
- python: 2.7 # 2.7 is required for node-gyp used in docs build
env: BUILD="docs" INSTALL="pip"
allow_failures:
- env: BUILD="docs"
before_install:
- if [[ $INSTALL == 'pip' ]]; then
pip install pip --upgrade;
pip install -r requirements.txt;
elif [[ $INSTALL == 'conda' ]]; then
if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-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";
conda config --set always_yes yes --set changeps1 no;
conda update -q conda;
conda info -a;
conda config --add channels conda-forge;
conda create -q -n testenv python=$TRAVIS_PYTHON_VERSION pytest;
source activate testenv;
conda install --file requirements.txt;
fi
- if [[ $BUILD == 'docs' ]]; then
if [[ $INSTALL == 'conda' ]]; then
conda install --file doc/requirements.txt;
elif [[ $INSTALL == 'pip' ]]; then
pip install -r doc/requirements.txt;
fi
fi
- if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then
sudo apt-get install libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g++;
npm install canvas vega vega-lite;
fi
install:
- python setup.py install
script:
- if [[ $BUILD == 'test' ]]; then
python -m pytest altair --doctest-modules;
elif [[ $BUILD == 'docs' ]]; then
cd doc && make html;
fi