forked from hardbyte/python-can
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
152 lines (138 loc) · 4.51 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
language: python
# Linux setup
dist: xenial
cache:
directories:
- "$HOME/.cache/pip"
python:
# CPython; only 3.6 is supported
- "3.6"
- "3.7"
- "3.8"
- nightly
# PyPy:
- pypy3
env:
install:
- if [[ "$TEST_SOCKETCAN" ]]; then sudo bash test/open_vcan.sh ; fi
- python setup.py install
script:
- |
# install tox
pip install tox
# Run the tests
tox -e travis
jobs:
allow_failures:
# we allow all dev & nightly builds to fail, since these python versions might
# still be very unstable
- python: nightly
# Allow arm64 builds to fail
- arch: arm64
include:
# Note no matrix support when using stages.
# Stages with the same name get run in parallel.
# Jobs within a stage can also be named.
# Unit Testing Stage
# testing socketcan on Trusty & Python 3.6, since it is not available on Xenial
- stage: test
name: Socketcan
os: linux
arch: amd64
dist: trusty
python: "3.6"
sudo: required
env: TEST_SOCKETCAN=TRUE
# arm64 builds
- stage: test
name: Linux arm64
os: linux
arch: arm64
language: generic
sudo: required
addons:
apt:
update: true
env: HOST_ARM64=TRUE
before_install:
- sudo apt install -y python3 python3-pip
# Travis doesn't seem to provide Python binaries yet for this arch
- sudo update-alternatives --install /usr/bin/python python $(which python3) 10
- sudo update-alternatives --install /usr/bin/pip pip $(which pip3) 10
# testing on OSX
- stage: test
os: osx
osx_image: xcode8.3
python: 3.6-dev
- stage: documentation
name: "Sphinx Build"
python: "3.7"
before_install:
- travis_retry pip install -r doc/doc-requirements.txt
script:
# Build the docs with Sphinx
# -a Write all files
# -n nitpicky
- python -m sphinx -an doc build
- stage: linter
name: "Linter Checks"
python: "3.7"
before_install:
- travis_retry pip install -r requirements-lint.txt
script:
# -------------
# pylint checking:
# Slowly enable all pylint warnings by adding addressed classes of
# warnings to the .pylintrc-wip file to prevent them from being
# re-introduced
# check the entire main codebase
- pylint --rcfile=.pylintrc-wip can/**.py
- pylint --rcfile=.pylintrc setup.py
- pylint --rcfile=.pylintrc doc.conf
# check the scripts folder
- find scripts -type f -name "*.py" | xargs pylint --rcfile=.pylintrc
# check the examples
- find examples -type f -name "*.py" | xargs pylint --rcfile=.pylintrc-wip
# -------------
# mypy checking:
- mypy
--python-version=3.7
--ignore-missing-imports
--no-implicit-optional
can/bit_timing.py
can/broadcastmanager.py
can/bus.py
can/interface.py
can/interfaces/slcan.py
can/interfaces/socketcan/**.py
can/interfaces/virtual.py
can/listener.py
can/logger.py
can/message.py
can/notifier.py
can/player.py
can/thread_safe_bus.py
can/typechecking.py
can/util.py
can/io/**.py
scripts/**.py
examples/**.py
- stage: linter
name: "Formatting Checks"
python: "3.7"
before_install:
- travis_retry pip install -r requirements-lint.txt
script:
- black --check --verbose .
- stage: deploy
name: "PyPi Deployment"
python: "3.7"
deploy:
provider: pypi
user: hardbyte
password:
secure: oQ9XpEkcilkZgKp+rKvPb2J1GrZe2ZvtOq/IjzCpiA8NeWixl/ai3BkPrLbd8t1wNIFoGwx7IQ7zxWL79aPYeG6XrljEomv3g45NR6dkQewUH+dQFlnT75Rm96Ycxvme0w1+71vM4PqxIuzyXUrF2n7JjC0XCCxHdTuYmPGbxVO1fOsE5R5b9inAbpEUtJuWz5AIrDEZ0OgoQpLSC8fLwbymTThX3JZ5GBLpRScVvLazjIYfRkZxvCqQ4mp1UNTdoMzekxsvxOOcEW6+j3fQO+Q/8uvMksKP0RgT8HE69oeYOeVic4Q4wGqORw+ur4A56NvBqVKtizVLCzzEG9ZfoSDy7ryvGWGZykkh8HX0PFQAEykC3iYihHK8ZFz5bEqRMegTmuRYZwPsel61wVd5posxnQkGm0syIoJNKuuRc5sUK+E3GviYcT8NntdR+4WBrvpQAYa1ZHpVrfnQXyaDmGzOjwCRGPoIDJweEqGVmLycEC5aT8rX3/W9tie9iPnjmFJh4CwNMxDgVQRo80m6Gtlf/DQpA3mH39IvWGqd5fHdTPxYPs32EQSCsaYLJV5pM8xBNv6M2S/KriGnGZU0xT7MEr46da0LstKsK/U8O0yamjyugMvQoC3zQcKLrDzWFSBsT7/vG+AuV5SK8yzfEHugo7jkPQQ+NTw29xzk4dY=
on:
# Have travis deploy tagged commits to PyPi
tags: true
skip_cleanup: true