-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
67 lines (53 loc) · 1.74 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
# References https://gist.github.com/dan-blanchard/7045057
# and https://docs.travis-ci.com/user/trusty-ci-environment/
# and https://github.com/Exopy/exopy/blob/master/.travis.yml
language: python
sudo: false
dist: trusty
#branches:
# only:
# - master
matrix:
include:
- env: PYTHON=2.7 CONDA_PY=27 QT_VERSION=5
- env: PYTHON=3.7 CONDA_PY=37 QT_VERSION=5
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 install conda-build anaconda-client -q
- conda info -a
- conda create -n travisci 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 dependencies
- $CONDA_INSTALL pyqt=$QT_VERSION numpy lmfit pyvisa
# Intall test tools
- $CONDA_INSTALL pytest
- $PIP_INSTALL pytest-cov
# Install codecov report tools
- $PIP_INSTALL codecov
install:
# Build conda package and install it (check that build script is not broken)
- cd $TRAVIS_BUILD_DIR
- conda build conda -q # Package building does run only very minimal tests
- conda install p13pt --use-local -q
script:
- cd ~
- export COVERAGE_DATAFILE=$TRAVIS_BUILD_DIR/.coverage
- pytest $TRAVIS_BUILD_DIR/tests --cov P13pt --cov-report xml:$TRAVIS_BUILD_DIR/coverage.xml
after_success:
- cd $TRAVIS_BUILD_DIR
- codecov