forked from cta-observatory/pyhessio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
95 lines (73 loc) · 2.95 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
language: python
python:
- 3.6
# This is just for "egg_info". All other builds are explicitly given in the matrix
env:
global:
# The following versions are the 'default' for tests, unless
# overidden underneath. They are defined here in order to save having
# to repeat them for all configurations.
- CONDA_INSTALL='conda install --yes'
- PIP_INSTALL='pip install'
- INSTALL_OPTIONAL=true
#matrix:
#- SETUP_CMD='egg_info'
#matrix:
#include:
# Do a coverage test in Python 3.
#- python: 3.4
# env: SETUP_CMD='test --coverage'
# Check for sphinx doc build warnings - we do this first because it
# may run for a long time
#- python: 3.4
# env: SETUP_CMD='build_sphinx -w'
# Try with optional dependencies disabled
#- python: 3.4
# env: SETUP_CMD='test' INSTALL_OPTIONAL=false
# Try all python versions with the latest numpy
#- python: 3.4
# env: SETUP_CMD='test'
before_install:
# UPDATE APT-GET LISTINGS
- sudo apt-get update
# Use utf8 encoding. Should be default, but this is insurance against future changes
- export PYTHONIOENCODING=UTF8
# Install miniconda following instructions at http://conda.pydata.org/docs/travis.html
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda-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
# Install conda build
- conda install conda-build
# Useful for debugging any issues with conda
- conda info -a
# DOCUMENTATION DEPENDENCIES
- if [[ $SETUP_CMD == build_sphinx* ]]; then sudo apt-get install graphviz texlive-latex-extra dvipng; fi
# Make sure that interactive matplotlib backends work
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
install:
# CONDA
- conda create --yes -n test python=$TRAVIS_PYTHON_VERSION
- source activate test
# CORE DEPENDENCIES
- if [[ $SETUP_CMD != egg_info ]]; then $CONDA_INSTALL numpy pytest pip ; fi
- if [[ $SETUP_CMD != egg_info ]]; then $PIP_INSTALL pytest-xdist; fi
# DOCUMENTATION DEPENDENCIES
- if [[ $SETUP_CMD == build_sphinx* ]]; then $CONDA_INSTALL Sphinx matplotlib; fi
# COVERAGE DEPENDENCIES
- if [[ $SETUP_CMD == 'test --coverage' ]]; then $PIP_INSTALL coverage coveralls; fi
# Create hessio lib anc cpyhessio library in local
- conda build .
- conda install --use-local pyhessio
- python setup.py develop
script:
- py.test
after_success:
- if [[ $SETUP_CMD == 'test --coverage' ]]; then coveralls --rcfile='pyhessio/tests/coveragerc'; fi