-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
52 lines (42 loc) · 1.66 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
language: python
# use container-based infrastructure
sudo : false
dist: trusty
python:
- "3.6"
branches:
only:
- master
env:
- PINT="N" PYVISA='N'
- PINT="Y" PYVISA='Y'
before_install:
- REDIRECT_TO=/dev/stdout # change to /dev/null to silence Travis
- wget -q http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
- chmod +x miniconda.sh
- ./miniconda.sh -b -p ~/anaconda &> ${REDIRECT_TO}
- export PATH=~/anaconda/bin:$PATH
- conda update --yes --quiet conda &> ${REDIRECT_TO}
- SRC_DIR=$(pwd)
- export ENV_NAME=travis
- conda create --yes -n $ENV_NAME python=$TRAVIS_PYTHON_VERSION pip > ${REDIRECT_TO};
- source activate $ENV_NAME
- conda install --yes --quiet pytest> ${REDIRECT_TO};
- pip install -q pytest-cov pytest-catchlog stringparser
# Use develop version of Pint
- if [ $PINT == 'Y' ]; then pip install https://github.com/hgrecco/pint/zipball/develop; fi
# Use develop version of pyvisa, pyvisa-py, pyvisa-sim
- if [ $PYVISA == 'Y' ]; then pip install -q https://github.com/hgrecco/pyvisa/zipball/master; fi
- if [ $PYVISA == 'Y' ]; then pip install -q https://github.com/hgrecco/pyvisa-py/zipball/master; fi
- if [ $PYVISA == 'Y' ]; then pip install -q https://github.com/hgrecco/pyvisa-sim/zipball/master; fi
- pip install -q codecov
install:
- cd $TRAVIS_BUILD_DIR
- python setup.py develop
script:
- cd ${SRC_DIR}
- export COVERAGE_DATAFILE=$TRAVIS_BUILD_DIR/.coverage
- "py.test $TRAVIS_BUILD_DIR/tests -v --cov i3py --cov-report xml --cov-report xml:$TRAVIS_BUILD_DIR/coverage.xml --cov-config $TRAVIS_BUILD_DIR/.coveragerc"
after_script:
- cd $TRAVIS_BUILD_DIR
- codecov