-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy path.travis.yml
72 lines (58 loc) · 2.46 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
dist: xenial
language: python
python: "3.7"
compiler: gcc
# 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
os: linux
env:
global:
# SET DEFAULTS TO AVOID REPEATING IN MOST CASES
# For now dark monitor path is set as blank
- CONDA_ARGS='--quiet'
- CONDA_INSTALL="conda install $CONDA_ARGS"
- CONDA_DEPS='stsci coverage'
- CONDA_DOC_DEPS="$CONDA_DEPS sphinx"
- SETUP_CMD='test'
- MONITOR_CONFIG='/home/travis/build/spacetelescope/cosmo/tests/cosmoconfig_test.yaml'
- DARK_PROGRAMS=''
- COSMO_FILES_SOURCE='/home/travis/build/spacetelescope/cosmo/tests/data'
- COSMO_SMS_SOURCE='/home/travis/build/spacetelescope/cosmo/tests/data'
- COSMO_OUTPUT='/home/travis/build/spacetelescope/cosmo/tests'
- COSMO_SMS_DB='/home/travis/build/spacetelescope/cosmo/tests/test.db'
- CRDS_SERVER_URL='https://hst-crds.stsci.edu'
- CRDS_PATH='/home/travis/build/spacetelescope/cosmo/tests/data/test_crds_cache'
install:
# USE UTF8 ENCODING. SHOULD BE DEFAULT, BUT THIS IS INSURANCE AGAINST FUTURE CHANGES
- export PYTHONIOENCODING=UTF8
# Install conda
# http://conda.pydata.org/docs/travis.html#the-travis-yml-file
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
- 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 config --add channels http://ssb.stsci.edu/astroconda
- conda install -c anaconda setuptools # Add setuptools install
- conda update -q -n base -c defaults conda # Update base packages
- conda info -a # Check the environment in case there are any issues
# Create and activate the test environment
- conda create $CONDA_ARGS -n test python=$TRAVIS_PYTHON_VERSION $AP_SELECT $NP_SELECT $CR_SELECT $CONDA_DEPS
- source activate test
# DOCUMENTATION DEPENDENCIES
- if [[ $SETUP_CMD == build_sphinx* ]]; then $CONDA_INSTALL numpy=$NUMPY_VERSION $CONDA_DOC_DEPS; fi
# Codecov
- pip install codecov
# Install package with pip
- pip install .
script:
- coverage run -m pytest
after_success: codecov