-
Notifications
You must be signed in to change notification settings - Fork 9
/
.travis.yml
77 lines (75 loc) · 3.08 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
#-------------------------------------------------------------------------------
#.travis.yml
#-------------------------------------------------------------------------------
# Author: Alan D. Snow, 2016
#-------------------------------------------------------------------------------
# System specifications for Travis CI
#-------------------------------------------------------------------------------
language: c
os:
- linux
- osx
env:
- TRAVIS_PYTHON_VERSION="2.7"
- TRAVIS_PYTHON_VERSION="3.5"
- TRAVIS_PYTHON_VERSION="3.6"
- TRAVIS_PYTHON_VERSION="3.7"
matrix:
fast_finish: true
allow_failures:
- os: osx
- env: TRAVIS_PYTHON_VERSION="2.7"
- env: TRAVIS_PYTHON_VERSION="3.5"
- env: TRAVIS_PYTHON_VERSION="3.7"
notifications:
email: false
#-------------------------------------------------------------------------------
# Before installing GSSHApy
#-------------------------------------------------------------------------------
before_install:
#-------------------------------------------------------------------------------
# Add miniconda - from https://gist.github.com/dan-blanchard/7045057
#-----------------------------------------------------------------------------
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
wget -O miniconda.sh http://repo.continuum.io/miniconda/Miniconda${TRAVIS_PYTHON_VERSION:0:1}-latest-Linux-x86_64.sh;
fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
curl -o miniconda.sh https://repo.continuum.io/miniconda/Miniconda${TRAVIS_PYTHON_VERSION:0:1}-latest-MacOSX-x86_64.sh;
fi
- chmod +x miniconda.sh
- ./miniconda.sh -b -p $HOME/miniconda
- export PATH=$HOME/miniconda/bin:$PATH
- conda config --set always_yes yes
- conda update conda python
#-----------------------------------------------------------------------------
# Create conda environment for gsshapy
#-----------------------------------------------------------------------------
- conda create -n gsshapy python=$TRAVIS_PYTHON_VERSION
- source activate gsshapy
- conda config --add channels conda-forge
- conda env update -n gsshapy -f conda_env.yml
# restart environment
- source deactivate
- source activate gsshapy
#-----------------------------------------------------------------------------
# Install additional required python packages
#-----------------------------------------------------------------------------
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
conda install pynio;
fi
#-------------------------------------------------------------------------------
#Installing GSSHApy
#-------------------------------------------------------------------------------
install:
- cd $TRAVIS_BUILD_DIR
- pip install -e .[tests]
#-------------------------------------------------------------------------------
#Testing GSSHApy
#-------------------------------------------------------------------------------
script:
- py.test --cov-report term-missing --cov=gsshapy
#-------------------------------------------------------------------------------
# Coveralls stats for code coverage
#-------------------------------------------------------------------------------
after_success:
- coveralls