forked from tardis-sn/tardis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
39 lines (31 loc) · 2.13 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
language: python
python:
- 2.7
virtualenv:
system_site_packages: true
env:
- CYTHON_VERSION=0.20.1 NUMPY_VERSION=1.8.0 PANDAS_VERSION=0.12 ASTROPY_VERSION=0.3.2 ASTROPY_USE_SYSTEM_PYTEST=1 SETUP_CMD='test' TEST_MODE='normal'
- CYTHON_VERSION=0.20.1 NUMPY_VERSION=1.8.0 PANDAS_VERSION=latest ASTROPY_VERSION=0.3.2 ASTROPY_USE_SYSTEM_PYTEST=1 SETUP_CMD='test' TEST_MODE='normal'
# - CYTHON_VERSION=0.20.1 NUMPY_VERSION=1.8.0 PANDAS_VERSION=0.12 ASTROPY_VERSION=0.3.2 ASTROPY_USE_SYSTEM_PYTEST=1 SETUP_CMD='test --coverage'
- CYTHON_VERSION=0.20.1 NUMPY_VERSION=1.8.0 PANDAS_VERSION=latest ASTROPY_VERSION=0.3.2 ASTROPY_USE_SYSTEM_PYTEST=1 SETUP_CMD='test --args="--atomic-dataset=$HOME/kurucz_cd23_chianti_H_He.h5"' TEST_MODE='spectrum'
before_install:
# We do this to make sure we get the dependencies so pip works below
- sudo apt-get update -qq
- sudo apt-get install -qq python-numpy python-pandas python-scipy python-h5py python-sphinx python-yaml cython libatlas-dev liblapack-dev gfortran
- if [[ $TEST_MODE == 'spectrum' ]]; then wget http://moria.astro.utoronto.ca/\~wkerzend/tardis_atomic_databases/kurucz_cd23_chianti_H_He.zip; fi
- if [[ $TEST_MODE == 'spectrum' ]]; then unzip kurucz_cd23_chianti_H_He.zip; fi
- if [[ $TEST_MODE == 'spectrum' ]]; then mv kurucz_cd23_chianti_H_He.h5 $HOME/; fi
install:
- export PYTHONIOENCODING=UTF8 # just in case
- pip install -q --upgrade "Cython==$CYTHON_VERSION"
- if [[ $PANDAS_VERSION == 'latest' ]]; then pip install -q --upgrade pandas; else pip install -q --upgrade "pandas==$PANDAS_VERSION"; fi
- if [[ $ASTROPY_VERSION == 'development' ]]; then pip -q install git+http://github.com/astropy/astropy.git#egg=astropy; else pip install -q --upgrade "astropy==$ASTROPY_VERSION"; fi
- pip install -q --upgrade pytest==2.5.1
- pip install -q --upgrade pytest-cov
- if [[ $SETUP_CMD == 'test --coverage' ]]; then pip install -q coveralls; fi
- if [[ $SETUP_CMD == 'test --coverage' ]]; then pip install -q pytest-cov; fi
script:
- echo $SETUP_CMD
- python setup.py $SETUP_CMD
after_success:
- if [[ $SETUP_CMD == 'test --coverage' ]]; then coveralls; fi