forked from microsoft/Qcodes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
94 lines (86 loc) · 3.07 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
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: bionic
services:
- xvfb
notifications:
email: false
cache: pip
addons:
apt_packages:
- pandoc
- libxkbcommon-x11-0 # needed for pyqt > 5.11 to work correctly with xvfb
python:
- "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 setuptools wheel
- pip install -r requirements.txt --use-feature=2020-resolver
- pip install -r test_requirements.txt --use-feature=2020-resolver
- pip install -r docs_requirements.txt --use-feature=2020-resolver
- 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 -m "not serial" --cov=qcodes --cov-report xml --cov-config=.coveragerc
- py.test -n 1 -m serial --cov-append --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 ..
- |
cd docs
make SPHINXOPTS="-W -v" htmlapi
# 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.7
- |
cd $HOME
if [[ $TRAVIS_PYTHON_VERSION == "3.7" ]]; 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