forked from has2k1/plotnine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
102 lines (92 loc) · 2.32 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
sudo: false
language: python
matrix:
fast_finish: true
include:
- python: 2.7
env:
- JOB: 'UNITTEST'
- FULL_DEPS: true
- python: 3.5
env:
- JOB: 'UNITTEST'
- FULL_DEPS: true
- python: 3.6
env:
- JOB: 'UNITTEST'
- FULL_DEPS: true
- python: 3.6
env:
- JOB: 'DOCS'
- FULL_DEPS: true
addons:
apt:
packages:
- pandoc
- python: 3.6
env:
- JOB: 'LINT'
- FULL_DEPS: false
cache: pip
notifications:
email: false
# miniconda recipe
# http://conda.pydata.org/docs/travis.html#using-conda-with-travis-ci
before_install:
- |
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"
- 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
# Install packages
install:
# Install dependencies
- conda create -q -n plotnine-test python=$TRAVIS_PYTHON_VERSION
- source activate plotnine-test
- |
if [[ "$FULL_DEPS" ]]; then
conda install scipy pandas statsmodels scikit-learn
export MPLLOCALFREETYPE=1
pip install matplotlib --no-binary matplotlib
pip install scikit-misc
pip install -e .
fi
- |
if [[ "$JOB" == "UNITTEST" ]]; then
conda install pytest-cov
pip install coveralls
elif [[ "$JOB" == "DOCS" ]]; then
pip install -r requirements/doc.txt
elif [[ "$JOB" == "LINT" ]]; then
pip install flake8
fi
# List all conda and pip packages
- conda list
- export MATPLOTLIB_BACKEND=agg
script:
- |
if [[ "$JOB" == "UNITTEST" ]]; then
coverage erase
make test
elif [[ "$JOB" == "DOCS" ]]; then
pushd doc
# low pandoc version leads to a warning so
# SPHINXOPTS=-W fails
make html && popd
elif [[ "$JOB" == "LINT" ]]; then
make lint
fi
# Calculate coverage
after_success:
- |
if [[ "$JOB" == "UNITTEST" ]]; then
coveralls --rcfile=.coveragerc
fi