forked from sncosmo/sncosmo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
87 lines (69 loc) · 2.62 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
# This is a modified copy of astropy's .travis.yml
# We set the language to c because python isn't supported on the MacOS X nodes
# on Travis. However, the language ends up being irrelevant anyway, since we
# install Python ourselves using conda.
language: c
os:
- linux
# 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. (need g++ for iminuit install)
addons:
apt:
packages:
- graphviz
- texlive-latex-extra
- dvipng
- g++
env:
global:
# Set defaults to avoid repeating in most cases.
- NUMPY_VERSION=1.12
- ASTROPY_VERSION=1.3
- SCIPY_VERSION=0.19
- OPTIONAL_DEPS=true
- MAIN_CMD='python setup.py'
matrix:
- PYTHON_VERSION=2.7 SETUP_CMD='egg_info'
- PYTHON_VERSION=3.4 SETUP_CMD='egg_info'
- PYTHON_VERSION=3.6 SETUP_CMD='egg_info'
matrix:
# Don't wait for allowed failures
fast_finish: true
include:
# Try Mac OS X
- os: osx
env: PYTHON_VERSION=2.7 SETUP_CMD='test'
- os: osx
env: PYTHON_VERSION=3.6 SETUP_CMD='test'
# Try all python versions
- os: linux
env: PYTHON_VERSION=2.7 SETUP_CMD='test'
- os: linux
env: PYTHON_VERSION=3.6 SETUP_CMD='test --remote-data --coverage'
# Try astropy 1.0 version and some older dependencies
- os: linux
env: PYTHON_VERSION=2.7 NUMPY_VERSION=1.10 SCIPY_VERSION=0.17 ASTROPY_VERSION=1.0 SETUP_CMD='test'
- os: linux
env: PYTHON_VERSION=3.5 NUMPY_VERSION=1.10 SCIPY_VERSION=0.17 ASTROPY_VERSION=1.0 SETUP_CMD='test'
# Try disabling optional dependencies
- os: linux
env: PYTHON_VERSION=2.7 OPTIONAL_DEPS=false SETUP_CMD='test'
- os: linux
env: PYTHON_VERSION=3.6 OPTIONAL_DEPS=false SETUP_CMD='test'
# Try older numpy versions & astropy versions
# (conda only has builds for np18 and later for astropy 1.0)
- os: linux
env: PYTHON_VERSION=2.7 NUMPY_VERSION=1.8 SCIPY_VERSION=0.12 ASTROPY_VERSION=0.4 SETUP_CMD='test'
# Do a PEP8 test
- os: linux
env: PYTHON_VERSION=3.6 MAIN_CMD='pep8 sncosmo --count --exclude=__init__.py' SETUP_CMD=''
install:
- source .continuous-integration/travis/setup_environment_$TRAVIS_OS_NAME.sh
script:
- $MAIN_CMD $SETUP_CMD
after_success:
- if [[ $SETUP_CMD == *"--coverage"* ]]; then
coveralls --rcfile='sncosmo/tests/coveragerc';
fi