-
Notifications
You must be signed in to change notification settings - Fork 6
/
.travis.yml
79 lines (70 loc) · 2.64 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
# We use miniconda python and python with travis workers under osx is not supported
# https://github.com/travis-ci/travis-ci/issues/2312
language: generic
# TBA needs > 4 Gb system, selecting sudo
# Increases available RAM to 7.5 Gb
# https://docs.travis-ci.com/user/reference/overview/
sudo: true
matrix:
include:
- os: linux
dist: trusty
env:
- TRAVIS_PYTHON_VERSION=2.7
- os: linux
dist: trusty
env:
- TRAVIS_PYTHON_VERSION=3.6
- os: osx
osx_image: xcode8
env:
- TRAVIS_PYTHON_VERSION=2.7
- os: osx
osx_image: xcode8
env:
- TRAVIS_PYTHON_VERSION=3.6
notifications:
email:
- pohl@physik.uni-bonn.de
cache:
directories:
- $HOME/.pip-cache/
# Setup miniconda python with needed packages
before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
MINICONDA_OS=Linux ;
else
MINICONDA_OS=MacOSX ;
fi ;
if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-$MINICONDA_OS-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-$MINICONDA_OS-x86_64.sh -O miniconda.sh;
fi
- chmod +x miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- conda config --set always_yes yes
# - conda update conda # https://github.com/travis-ci/travis-ci/issues/8512
- conda info -a
- conda create -q -n tba python="$TRAVIS_PYTHON_VERSION" pip
- source activate tba
- conda install --quiet numpy cython pytables scipy matplotlib nose numba mock pytest-cov pyyaml pyqt # https://github.com/conda/conda/issues/6487
- pip install --upgrade pip
- pip install progressbar-latest xvfbwrapper coverage python-coveralls pixel_clusterizer pylandau pytest
- pip install -r requirements_docs.txt
- python setup.py develop
- printenv | sort
# Run test
script:
# Hack to allow tests coverage in multi processes, http://coverage.readthedocs.org/en/latest/subprocess.html
- export COVERAGE_PROCESS_START=$PWD/.coveragerc
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
touch $HOME/miniconda/lib/python2.7/site-packages/converage.pth && printf "import coverage; coverage.process_startup()" > $HOME/miniconda/lib/python2.7/site-packages/converage.pth;
else
touch $HOME/miniconda/lib/python3.6/site-packages/converage.pth && printf "import coverage; coverage.process_startup()" > $HOME/miniconda/lib/python3.6/site-packages/converage.pth;
fi
- travis_wait 40 py.test --cov=testbeam_analysis
after_success:
- coveralls --data_file .coverage.*
- scripts/create_doc.sh