forked from microsoft/Qcodes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
104 lines (94 loc) · 3.33 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
branches:
only:
- master
# All release branches which start with "release/v", e.g. "release/v0.8.*"
- /^release\/v\S+/
# all release tags
# The regexp is taken from PEP 440 (https://www.python.org/dev/peps/pep-0440/#appendix-b-parsing-version-strings-with-regular-expressions)
- /^v([1-9][0-9]*!)?(0|[1-9][0-9]*)(\.(0|[1-9][0-9]*))*((a|b|rc)(0|[1-9][0-9]*))?(\.post(0|[1-9][0-9]*))?(\.dev(0|[1-9][0-9]*))?$/
language: python
sudo: required
dist: xenial
services:
- xvfb
notifications:
email: false
cache: pip
# remember to remove 3.8 related workarounds below once
# 3.8 is released and wheels are available.
addons:
apt_packages:
- pandoc
- libhdf5-dev # remove once h5py is packaged for 3.8
- gcc # remove once h5py is packaged for 3.8
- python-dev # remove once h5py is packaged for 3.8
python:
- "3.6"
- "3.7"
- "3.8"
# whitelist
# command to install dependencies and qcodes
# We want to fail early if there is an installation problem, so
# we install here, although we uninstall below
install:
- pip install --upgrade pip
- pip install cython # this can go once we have scipy wheels for 3.8
- pip install -r requirements.txt
- pip install -r test_requirements.txt --upgrade --upgrade-strategy only-if-needed
- pip install -r docs_requirements.txt
- pip install .
before_script: # fetch full history so we can generate db fixtures
- git fetch --unshallow
script:
# The legacy dataset generation only works with an EDITABLE installation,
# but we want to run the test suite with a normal installation, hence
# this install dance
- |
pip uninstall -y qcodes
pip install -e .
cd ..
git clone https://github.com/QCoDeS/qcodes_generate_test_db.git
cd qcodes_generate_test_db
python generate_version_0.py
python generate_version_1.py
python generate_version_2.py
python generate_version_3.py
python generate_version_4a.py
python generate_version_4.py
python generate_version_5.py
python generate_version_6.py
python generate_version_7.py
python generate_version_8.py
cd $TRAVIS_BUILD_DIR
pip uninstall -y qcodes
pip install .
- cd qcodes
- py.test --cov=qcodes --cov-report xml --cov-config=.coveragerc
- cd ..
- mypy qcodes
# check that line endings are correct avoiding mixed windows/unix style line endings
- pylint --reports=n --disable=all --enable=mixed-line-endings,unexpected-line-ending-format --expected-line-ending-format=LF qcodes
# run benchmarks to make sure they are correct
- |
cd benchmarking
asv machine --machine travis
asv dev --machine travis
- cd ..
# build docs with warnings as errors. We skip the docs for python 3.8 until pyqt5 is available
- |
if [[ $TRAVIS_PYTHON_VERSION != "3.8" ]]; then
cd docs
make SPHINXOPTS="-W -v" htmlapi
fi
# rerun the tests from within a python session to ensure that all fixtures
# are bundled correctly. To save time we only do this from python 3.6
- |
cd $HOME
if [[ $TRAVIS_PYTHON_VERSION == "3.6" ]]; then
python -c "import sys; import qcodes; ec = qcodes.test(); sys.exit(ec)"
fi
after_success:
# upload code coverage
- cd $TRAVIS_BUILD_DIR
- python-codacy-coverage -r qcodes/coverage.xml
- codecov