-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
124 lines (114 loc) · 3.4 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
sudo: false
language: python
os: linux
install:
- &upgrade_python_toolset pip install --upgrade pip setuptools wheel
- &install_test_deps pip install --upgrade -r pytest_requirements.txt
- &install_deps pip install -r requirements.txt
- pip install --upgrade pytest-cov coveralls
_python:
- &python37
name: "Python 3.7"
python: 3.7
dist: xenial
sudo: true
- &pypy3
name: "PyPy3"
python: pypy3
_helpers:
- &build_package python setup.py bdist_wheel
- &static_analysis
stage: Static analysis
<<: *python37
after_success: skip
- &code_style_check
stage: Code style check
<<: *python37
after_success: skip
script:
- pip install -e .
- py.test -vv --cov-config .coveragerc --cov-report= --cov=binfield test
- coverage report -m --fail-under 89
after_success:
- coveralls
jobs:
fast_finish: true
include:
- <<: *static_analysis
name: "PyLint"
install:
- *upgrade_python_toolset
- *install_deps
- pip install --upgrade pylint
script:
- pylint binfield
- <<: *static_analysis
name: "Bandit"
install:
- *upgrade_python_toolset
- pip install --upgrade bandit
script:
- bandit -r binfield
- <<: *static_analysis
name: "MyPy"
install:
- *upgrade_python_toolset
- *install_deps
- pip install --upgrade "mypy >= 0.620"
script:
- mypy --strict binfield
- <<: *code_style_check
name: "PEP8"
install:
- *upgrade_python_toolset
- pip install --upgrade flake8
script:
- flake8
- <<: *code_style_check
name: "PEP257"
install:
- *upgrade_python_toolset
- pip install --upgrade pydocstyle
script:
- pydocstyle binfield
- <<: *code_style_check
name: "Black formatting"
install:
- *upgrade_python_toolset
- pip install --upgrade black
script:
- black --check binfield
- stage: test
<<: *python37
# - stage: test
# <<: *pypy3
- stage: deploy
# This prevents job from appearing in test plan unless commit is tagged:
if: tag IS present
# Run on pypy to build not cythonized wheel
<<: *python37
name: Build universal and cythonized bdist_wheel. Deploy bdist and sdist.
services:
- docker
install:
- *upgrade_python_toolset
script:
- ./tools/run_docker.sh "binfield"
before_deploy:
- pip install -r build_requirements.txt
- *build_package
deploy:
- provider: pypi
# `skip_cleanup: true` is required to preserve binary wheels, built
# inside of manylinux1 docker container during `script` step above.
skip_cleanup: true
user: penguinolog
password:
secure: cqEVQkkhyEqFyvf0aPLuCRRneV8Hc6ZTPKDxdbQHzfFSb0APp268/z2ASKtqFx5jydogFr+IZ9RE5biOYAMLDxTUtmSjvDIjqbtmm7QrJFWLVPGi5TUtGettsz18pzFVQudERQ7k8EhGnHpvIeGA9IEmSwC3+1xseZrHIBnOnAMRxnPIJbgJtkKno8nazqxeRcdm5KOUrH0Bb4UEtVdL8KPOEXjTFj4etLAQzdrkGjZsUTxTY7CTuckSCXfsqIcDmwUdgUkFQANDu2HtxoR+u6eVJ1J4XPfyaEWd2KYMmfXxKNGosmznict37LiQmPCpWwyw5jpJ2cPByav7LJZCjymH304SBpVVnIu1aeQtWa3TG/CSZ4nJizJaCNHSzJryw8CJFrgYwByPdSM3nQo/EqZUv/yJKqYMkkvnZw8569MApY+mTSiYcj549duppICMeUl465+Un7PhscK7fFvzGzy/lIA7uNCVtX9uvwE8HZrsxeCUk2zAEGXwzGzYZrQ0mN/ufwouWPt75BWErUEDn1Azr0+6zrBqdXmvDj8mdKwQdasB0ATWTsy5sH/ZJzutctA018CDY9pa1vrbLvQNHVwCYjXxoYzCN6Jxqh5PDeHXm/DyBSSQK+omxfYpS/Aj/h0GvvTTYMHhEAoD7bxKM4tclgtE8aMDu4POI5cBtsA=
on:
tags: true
distributions: sdist
skip_upload_docs: true
cache: pip
before_cache:
- rm -f $HOME/.cache/pip/log/debug.log