-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
96 lines (78 loc) · 2.65 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
92
93
94
95
96
# After changing this file, check it on:
# http://lint.travis-ci.org/
#
language: python
python:
- "2.6"
- "2.7"
- "3.2"
- "3.3"
- "3.4"
- "pypy"
matrix:
fast_finish: true
include:
- python: "3.4"
env: FROM_SOURCE=true
allow_failures:
# 3.4 and pypy Wheels are not yet available.
- python: "pypy"
- env: FROM_SOURCE=true
env:
global:
# Install from wheels *only*.
- PIPINSTALL="pip install -v --use-wheel --no-index --find-links=http://wheels.astropy.org --find-links=http://wheels2.astropy.org"
matrix:
- OPTIONAL_DEPS=true
- OPTIONAL_DEPS=false
before_install:
### Prepare the system to install prerequisites or dependencies
- uname -a
- printenv
- pip install --upgrade setuptools
- pip install --upgrade pip
- pip install wheel
- pip --version
install:
### Install any prerequisites or dependencies necessary to run the build.
# Skipping pydot (not 3.x compatible)
# Skipping gdal (errors during pip installs)
- sudo apt-get update -qq
- if [ "${FROM_SOURCE}" != "true" ]; then $PIPINSTALL numpy; fi
- if [ "${OPTIONAL_DEPS}" == "true" ]; then $PIPINSTALL Cython; fi
# Try to install latest and greatest from source.
- if [ "${FROM_SOURCE}" == "true" ]; then pip install --upgrade numpy Cython; fi
before_script:
### Use this to prepare your build for testing
- pip install --upgrade nose
- pip install --upgrade coverage
- pip install --upgrade coveralls
script:
- printenv PWD
- pip install .
- export BUHMM_INSTALL=`pip show buhmm | grep Location | awk '{print $2"/buhmm"}'`
# nose 1.3.0 does not tell coverage to only cover the requested
# package (except during the report). So to restrict coverage, we must
# inform coverage through the .coveragerc file.
- cp .coveragerc $BUHMM_INSTALL
- cp setup.cfg $BUHMM_INSTALL
# Move to new directory so that dit is not imported from repository.
# Why? Because we want the tests to make sure that dit was installed
# correctly. Example: setup.py might not have included some submodules.
# Testing from the git repository cannot catch a mistake like that.
#
# Export current directory for logs.
- cd $BUHMM_INSTALL
- printenv PWD
# Run nosetests.
- nosetests --verbosity=2 --with-coverage --cover-package=buhmm
after_success:
# We must run coveralls from the git repo. But we ran tests from the
# installed directory. The .coverage file looks like it contains absolute
# paths, but coveralls does not seem to care.
- cp .coverage $TRAVIS_BUILD_DIR
- cd $TRAVIS_BUILD_DIR
# Report coverage for 2.7 only.
- if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then coveralls; fi
notifications:
email: false