forked from pymeasure/pymeasure
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
68 lines (62 loc) · 1.62 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
language: c
matrix:
include:
- os: linux
env: PYTHON=3.4 CONDA_PY=34
sudo: true
- os: linux
env: PYTHON=3.5 CONDA_PY=35
sudo: true
- os: linux
env: PYTHON=3.6 CONDA_PY=36
sudo: true
- os: linux
env: PYTHON=3.6 DOCS=true
sudo: true
- os: osx
env: PYTHON=3.4 CONDA_PY=34
sudo: false
- os: osx
env: PYTHON=3.5 CONDA_PY=35
sudo: false
- os: osx
env: PYTHON=3.6 CONDA_PY=36
sudo: false
# command to install dependencies
install:
- if [ ${TRAVIS_OS_NAME} == "osx" ]; then
MINICONDA_OS="MacOSX";
else
MINICONDA_OS="Linux";
fi
- MINICONDA_URL="http://repo.continuum.io/miniconda"
- MINICONDA_FILE="Miniconda3-latest-${MINICONDA_OS}-x86_64.sh"
- wget "${MINICONDA_URL}/${MINICONDA_FILE}"
- bash $MINICONDA_FILE -b -p $HOME/miniconda
- export PATH=$HOME/miniconda/bin:$PATH
- conda update --yes conda
- conda install --yes pip
- conda install --yes nbformat
- ENVIRONMENT_FILE="requirements/conda-${PYTHON}.yml"
- conda env create -f $ENVIRONMENT_FILE
- source activate pymeasure
- if [ -n "${DOCS}" ]; then
conda install --yes sphinx sphinx_rtd_theme;
fi
- conda info -a
# test environment setup
before_script:
# GUI testing on Linux
- 'if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
export DISPLAY=:99.0;
sh -e /etc/init.d/xvfb start;
sleep 3;
fi'
# command to run tests
script:
- python setup.py test
- if [ -n "${DOCS}" ]; then
cd docs;
make doctest || travis_terminate 1;
make html || travis_terminate 1;
fi