/
.travis.yml
153 lines (140 loc) · 4.44 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
153
language: python
os: linux
dist: xenial
sudo: true
install:
- &upgrade_python_toolset pip install --upgrade pip setuptools wheel
- &install_test_deps pip install --upgrade asynctest mock pytest pytest-mock pytest-asyncio pytest-sugar
- &install_deps pip install -r CI_REQUIREMENTS.txt
- pip install --upgrade pytest-cov coveralls
_python:
- &python36
name: "Python 3.6"
python: "3.6"
- &python37
name: "Python 3.7"
python: "3.7"
- &python38
name: "Python 3.8"
python: "3.8"
_helpers:
- &install_cython pip install --upgrade Cython
- &build_package python setup.py bdist_wheel
- &install_built pip install exec_helpers --no-index -f dist
- &test_no_cov py.test -vvv test
- &test_cythonized
stage: Test cythonized
install:
- *upgrade_python_toolset
- *install_test_deps
- *install_deps
- *install_cython
script:
- *build_package
- *install_built
- *test_no_cov
after_success: skip
- &static_analysis
stage: Static analysis
<<: *python37
after_success: skip
- &code_style_check
stage: Code style check
<<: *python37
after_success: skip
script:
- python setup.py develop -v
- py.test --cov-config .coveragerc --cov=exec_helpers test
after_success:
- coveralls
jobs:
include:
- <<: *static_analysis
name: "PyLint"
install:
- *upgrade_python_toolset
- *install_deps
- pip install --upgrade "pylint >= 2.3" isort[pyproject,requirements]
script:
- python setup.py --version
- pylint exec_helpers
- <<: *static_analysis
name: "Bandit"
install:
- *upgrade_python_toolset
- pip install --upgrade bandit
script:
- bandit -r exec_helpers
- <<: *static_analysis
name: "MyPy"
install:
- *upgrade_python_toolset
- *install_deps
- pip install --upgrade "mypy >= 0.720"
script:
- python setup.py --version
- mypy --strict exec_helpers
- <<: *static_analysis
name: "PEP8"
install:
- *upgrade_python_toolset
- pip install --upgrade flake8 flake8-bugbear
script:
- flake8
# - <<: *code_style_check
# name: "PEP257"
# install:
# - *upgrade_python_toolset
# - pip install --upgrade pydocstyle
# script:
# - pydocstyle -v exec_helpers
- <<: *code_style_check
name: "Black formatting"
install:
- *upgrade_python_toolset
- pip install --upgrade black
script:
- black --check exec_helpers
- stage: test
<<: *python36
- stage: test
<<: *python37
- stage: test
<<: *python38
- <<: *test_cythonized
<<: *python36
- <<: *test_cythonized
<<: *python37
- <<: *test_cythonized
<<: *python38
- 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
- *install_deps
script:
- ./tools/run_docker.sh "exec_helpers"
before_deploy:
- *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: "maml4+SU/6NtRf7JIwWhVyXkesE9Gk5Umdo3txOjcrcvt84S3NlN/hFgdNclMUpJ3b+rOFEpiZOamtDKbP67uhlA6yJ364SxW5T3ZQJ8tjFFzMHcaM38HgGbgLR8AxK8fdZKRg9gVMnGofeiusB5aNsKmn9XnvESc8dNv0Umdmi83wXxm+DfVRXL8VTFgwsH3BxQy/Kdv6upRrXyNWkyoi8Zk8PkrFFDpFoW9WK1fRBqnvCw1Wt8nEAJah7y2b7vj52eM+MfT3IL+jpocZqOJQlFPdWkTonX7mAP9nB97kk4DMbm3ZqUw2Qr9pM0nKK9HhrXhsSSUGa1w95zmw9nbXLrpfnQ61Lyk9pGcVh60WbrVKstE/x9Lq3pqGsA/YKqsIZK3OAqRfBHNG9L7lekP05hXyDNHJXGoEyGQjVA/666S2ZCjM10XaaUmZ5P1kPGocCnEjv86dKdINTkFM6L0n4oIu1nyftBhVu9jz0xQaxute4LZNJiQtE6x8NX3WuSO68UhWjDqevYdRgW55Gp1OD4ilfA/SVNPpsHJfB2baue1fi9m8Rn3bWQSJoZ8twYHoIxEOAIXyMBhYnmldvsuUY6h5p+/hk6kpJAsTXZFjUSa/FPIH84QvDkNCoZxwInSkjEN1tj9PBep2vYcLMd92+g6udtin8FbYMZItiDl1M="
on:
tags: true
distributions: sdist
skip_upload_docs: true
skip_existing: true
cache: pip
before_cache:
- rm -f $HOME/.cache/pip/log/debug.log