forked from zblz/naima
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
91 lines (76 loc) · 2.71 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
# set language to C because python is not supported in Mac. Does not make a
# difference because we install python through conda
language: c
branches:
only:
- master
# Setting sudo to false opts in to Travis-CI container-based builds.
sudo: false
# The apt packages below are needed for sphinx builds, which can no longer
# be installed with sudo apt-get.
addons:
apt:
packages:
- graphviz
- texlive-latex-extra
- dvipng
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.
- PYTHON_VERSION=3.6
- NUMPY_VERSION=1.13
- ASTROPY_VERSION=stable
- CONDA_DEPENDENCIES='pytest pip Cython jinja2 pyyaml scipy matplotlib h5py mock sphinx_rtd_theme'
- PIP_DEPENDENCIES='emcee corner'
matrix:
- PYTHON_VERSION=2.7 SETUP_CMD='egg_info'
- PYTHON_VERSION=3.6 SETUP_CMD='egg_info'
matrix:
include:
# Try MacOS X
- os: osx
env: PYTHON_VERSION=2.7 SETUP_CMD='test --args="-v"'
- os: osx
env: SETUP_CMD='test --args="-v"'
# Check for sphinx doc build warnings
- os: linux
env: SETUP_CMD='build_docs -w'
# Run examples, do it first as well as it may take some time
- os: linux
env: SETUP_CMD='examples'
# Try all python versions, with sherpa and coverage testing in py35
- os: linux
env: PYTHON_VERSION=2.7 SETUP_CMD='test --args="-v"'
- os: linux
env: PYTHON_VERSION=3.5 SETUP_CMD='test --coverage --args="-v"'
CONDA_CHANNELS='astropy-ci-extras sherpa'
CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES sherpa"
- os: linux
env: SETUP_CMD='test --args="-v"'
before_install:
# If there are matplotlib tests, comment these out to
# Make sure that interactive matplotlib backends work
#- export DISPLAY=:99.0
#- sh -e /etc/init.d/xvfb start
install:
- git clone git://github.com/astropy/ci-helpers.git
- source ci-helpers/travis/setup_conda.sh
script:
- |
if [[ $SETUP_CMD == 'examples' ]]; then
python setup.py install
cd examples
echo 'backend : Agg' > matplotlibrc
for script in RXJ1713*.py; do
echo ''
echo "Running example $script..."
time python $script
done
else
python setup.py $SETUP_CMD
fi
after_success:
# Uncomment line below if coveralls.io is set up for this package.
- if [[ $SETUP_CMD == *coverage* ]]; then coveralls --rcfile='naima/tests/coveragerc'; fi