-
Notifications
You must be signed in to change notification settings - Fork 10
/
.travis.yml
70 lines (57 loc) · 2.13 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
# References https://gist.github.com/dan-blanchard/7045057
# and https://docs.travis-ci.com/user/trusty-ci-environment/
branches:
only:
- master
matrix:
include:
- env: PYTHON=3.6 CONDA_PY=36
- env: PYTHON=3.7 CONDA_PY=37
- env: PYTHON=3.8 CONDA_PY=38
before_install:
# Install Miniconda
- travis_retry wget -q https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
- chmod +x miniconda.sh
- ./miniconda.sh -b -p ~/anaconda
- export PATH=~/anaconda/bin:$PATH
# Setup environment
- travis_retry conda update --yes conda
- conda config --set always_yes yes
- conda config --append channels conda-forge
- conda config --append channels exopy
- conda install conda-build anaconda-client -q
- conda info -a
- conda create -n travisci --yes python=$PYTHON pip
- source activate travisci
- CONDA_INSTALL="conda install -q"
- PIP_INSTALL="pip install -q"
# Setup conda build output directory
- cd ~
- mkdir conda-bld-out
- cd conda-bld-out
- export CONDA_BLD_PATH=$(pwd)
# Install exopy dependencies
- $CONDA_INSTALL pyqt numpy h5py pyclibrary pyvisa
- $PIP_INSTALL git+https://github.com/Exopy/exopy.git#egg=exopy
- $PIP_INSTALL git+https://github.com/Exopy/exopy_pulses.git#egg=exopy_pulses
# Intall test tools
- $CONDA_INSTALL pytest
- $PIP_INSTALL pytest-cov pytest-timeout pytest-qt
install:
# Install exopy_hqc_legacy
- cd $TRAVIS_BUILD_DIR
# Needed to install pyvisa for testing purposes
- conda config --append channels conda-forge
- conda build conda -q # Package building does run only very minimal tests
- conda install exopy_hqc_legacy --use-local -q
- cd ~
before_script:
# I need a (fake) display on Travis so I need to start a X server.
- export DISPLAY=:99.0
- /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1400x900x24 -ac +extension GLX +render
script:
# Run the exopy-hqc-legacy test suite
- cd $TRAVIS_BUILD_DIR
- py.test tests
after_success:
- if [ "$TRAVIS_PULL_REQUEST" = false ]; then bash continuous-integration/deploy.sh; fi