-
Notifications
You must be signed in to change notification settings - Fork 13
/
.travis.yml
40 lines (36 loc) · 1.62 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
# Disable sudo to speed up the build
sudo: false
# Set the build language to Python
language: python
jobs:
include:
- name: "Python 3.6 on Xenial Linux"
os: linux
python: 3.6 # this works for Linux but is ignored on macOS or Windows
- name: "Python 3.8.0 on Windows"
os: windows # Windows 10.0.17134 N/A Build 17134
language: shell # 'language: python' is an error on Travis CI Windows
before_install:
- choco install python --version 3.8.0
- python -m pip install --upgrade pip
env: PATH=/c/Python38:/c/Python38/Scripts:$PATH
allow_failures:
- name: "Python 3.7.4 on macOS"
os: osx
osx_image: xcode11.2 # Python 3.7.4 running on macOS 10.14.4
language: shell # 'language: python' is an error on Travis CI macOS
# all three OSes agree about 'pip3'
install:
- pip3 install --upgrade pip
- pip3 install -r requirements.txt
- pip3 install mypy
- pip3 install flake8
# 'python' points to Python 2.7 on macOS but points to Python 3.8 on Linux and Windows
# 'python3' is a 'command not found' error on Windows but 'py' works on Windows only
script:
- python3 -m mypy --config-file=mypy.ini srudp || python -m mypy --config-file=mypy.ini srudp
- python3 -m unittest discover || python -m unittest discover
# stop the build if there are Python syntax errors or undefined names
- flake8 srudp --count --select=E901,E999,F821,F822,F823 --show-source --statistics
# exit-zero treats all errors as warnings. PyCharm is 120 chars wide
- flake8 srudp --count --exit-zero --max-complexity=12 --max-line-length=120 --statistics