Skip to content

Commit dc294c8

Browse files
authored
Do not use tox on travis - make CI faster (#79)
1 parent b5f8827 commit dc294c8

File tree

7 files changed

+59
-45
lines changed

7 files changed

+59
-45
lines changed

.travis.yml

Lines changed: 42 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,31 @@ language: python
33
os: linux
44
install:
55
- &upgrade_python_toolset pip install --upgrade pip setuptools wheel
6-
- pip install tox
7-
- pip install coveralls
8-
script: []
6+
- &install_test_deps pip install --upgrade pytest pytest-sugar
7+
- &install_deps pip install -r CI_REQUIREMENTS.txt
8+
- pip install --upgrade pytest-cov coveralls
9+
10+
_helpers:
11+
- &install_cython pip install --upgrade Cython
12+
- &build_package python setup.py bdist_wheel
13+
- &install_built pip install exec_helpers --no-index -f dist
14+
- &test_no_cov py.test -vv test
15+
- &test_cythonized
16+
install:
17+
- *upgrade_python_toolset
18+
- *install_test_deps
19+
- *install_deps
20+
- *install_cython
21+
script:
22+
- *build_package
23+
- *install_built
24+
- *test_no_cov
25+
after_success: skip
26+
27+
script:
28+
- pip install -e .
29+
- py.test -vv --cov-config .coveragerc --cov-report= --cov=exec_helpers test
30+
- coverage report -m --fail-under 90
931
after_success:
1032
- coveralls
1133

@@ -15,50 +37,41 @@ jobs:
1537
- stage: test
1638
name: "Python 3.4"
1739
python: 3.4
18-
script:
19-
- tox -e py34
2040
- stage: test
2141
name: "Python 3.5"
2242
python: 3.5
23-
script:
24-
- tox -e py35
2543
- stage: test
2644
name: "Python 3.6"
2745
python: 3.6
28-
script:
29-
- tox -e py36
3046
- stage: test
3147
name: "Python 3.7"
3248
python: 3.7
3349
dist: xenial
3450
sudo: true
35-
script:
36-
- tox -e py37
3751
- stage: test
3852
name: "PyPy3"
3953
python: pypy3.5
40-
script:
41-
- tox -e pypy3
4254

4355
- stage: Static analisys
4456
name: "PyLint"
4557
python: 3.6
4658
services: []
4759
install:
4860
- *upgrade_python_toolset
49-
- pip install tox
61+
- *install_deps
62+
- pip install --upgrade "pylint >= 2.0"
5063
script:
51-
- tox -e pylint
64+
- pylint exec_helpers
5265
after_success: skip
5366
- stage: Static analisys
5467
name: "Bandit"
5568
python: 3.6
5669
services: []
5770
install:
5871
- *upgrade_python_toolset
59-
- pip install tox
72+
- pip install --upgrade bandit
6073
script:
61-
- tox -e bandit
74+
- bandit -r exec_helpers
6275
after_success: skip
6376
- stage: Static analisys
6477
name: "MyPy"
@@ -68,55 +81,48 @@ jobs:
6881
services: []
6982
install:
7083
- *upgrade_python_toolset
71-
- pip install tox
84+
- *install_deps
85+
- pip install --upgrade "mypy >= 0.620"
7286
script:
73-
- tox -e mypy
87+
- mypy --strict exec_helpers
7488
after_success: skip
7589

7690
- stage: Test cythonized
7791
name: "Python 3.4"
7892
python: 3.4
79-
script:
80-
- tox -e py34-nocov
81-
after_success: skip
93+
<<: *test_cythonized
8294
- stage: Test cythonized
8395
name: "Python 3.5"
8496
python: 3.5
85-
script:
86-
- tox -e py35-nocov
87-
after_success: skip
97+
<<: *test_cythonized
8898
- stage: Test cythonized
8999
name: "Python 3.6"
90100
python: 3.6
91-
script:
92-
- tox -e py36-nocov
93-
after_success: skip
101+
<<: *test_cythonized
94102
- stage: Test cythonized
95103
name: "Python 3.7"
96104
python: 3.7
97105
dist: xenial
98106
sudo: true
99-
script:
100-
- tox -e py37-nocov
101-
after_success: skip
107+
<<: *test_cythonized
102108

103109
- stage: Code style check
104110
name: "PEP8"
105111
python: 3.6
106112
install:
107113
- *upgrade_python_toolset
108-
- pip install tox
114+
- pip install --upgrade flake8
109115
script:
110-
- tox -e pep8
116+
- flake8
111117
after_success: skip
112118
- stage: Code style check
113119
name: "PEP257"
114120
python: 3.6
115121
install:
116122
- *upgrade_python_toolset
117-
- pip install tox
123+
- pip install --upgrade pydocstyle
118124
script:
119-
- tox -e pep257
125+
- pydocstyle exec_helpers
120126
after_success: skip
121127

122128
- stage: deploy
@@ -132,7 +138,7 @@ jobs:
132138
- ./tools/run_docker.sh "exec_helpers"
133139
before_deploy:
134140
- pip install -r build_requirements.txt
135-
- python setup.py bdist_wheel
141+
- *build_package
136142
deploy:
137143
- provider: pypi
138144
# `skip_cleanup: true` is required to preserve binary wheels, built

exec_helpers/_ssh_client_base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ def __init__(
285285
auth: typing.Optional[ssh_auth.SSHAuth] = None,
286286
verbose: bool = True,
287287
) -> None:
288-
"""SSHClient helper.
288+
"""Main SSH Client helper.
289289
290290
:param host: remote hostname
291291
:type host: str
@@ -387,7 +387,7 @@ def __str__(self) -> str: # pragma: no cover
387387

388388
@property
389389
def _ssh(self) -> paramiko.SSHClient:
390-
"""ssh client object getter for inheritance support only.
390+
"""Ssh client object getter for inheritance support only.
391391
392392
Attention: ssh client object creation and change
393393
is allowed only by __init__ and reconnect call.

exec_helpers/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def __init__(
4545
logger: logging.Logger,
4646
log_mask_re: typing.Optional[str] = None,
4747
) -> None:
48-
"""ExecHelper global API.
48+
"""Global ExecHelper API.
4949
5050
:param log_mask_re: regex lookup rule to mask command for logger.
5151
all MATCHED groups will be replaced by '<*masked*>'

exec_helpers/ssh_auth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def __get_public_key(key: typing.Union[paramiko.RSAKey, None])-> typing.Optional
102102

103103
@property
104104
def public_key(self) -> typing.Optional[str]:
105-
"""public key for stored private key if presents else None.
105+
"""Public key for stored private key if presents else None.
106106
107107
:rtype: str
108108
"""

exec_helpers/ssh_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def _path_esc(path: str) -> str:
4040
return path.replace(' ', '\ ')
4141

4242
def mkdir(self, path: str) -> None:
43-
"""run 'mkdir -p path' on remote.
43+
"""Run 'mkdir -p path' on remote.
4444
4545
:type path: str
4646
"""
@@ -50,7 +50,7 @@ def mkdir(self, path: str) -> None:
5050
self.execute("mkdir -p {}\n".format(self._path_esc(path)))
5151

5252
def rm_rf(self, path: str) -> None:
53-
"""run 'rm -rf path' on remote.
53+
"""Run 'rm -rf path' on remote.
5454
5555
:type path: str
5656
"""

setup.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,13 @@ exclude =
3939
__init__.py,
4040
docs
4141
ignore =
42+
show-pep8 = True
4243
show-source = True
4344
count = True
45+
max-line-length = 120
46+
47+
[pydocstyle]
48+
ignore = D401, D203, D213
4449

4550
[aliases]
4651
test=pytest

tox.ini

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ commands = flake8
7474

7575
[testenv:pep257]
7676
deps =
77-
pep257
77+
pydocstyle
7878
usedevelop = False
79-
commands = pep257 exec_helpers
79+
commands = pydocstyle exec_helpers
8080

8181
[testenv:install]
8282
deps =
@@ -102,12 +102,15 @@ exclude =
102102
build,
103103
__init__.py,
104104
docs
105-
105+
ignore =
106106
show-pep8 = True
107107
show-source = True
108108
count = True
109109
max-line-length = 120
110110

111+
[pydocstyle]
112+
ignore = D401, D203, D213
113+
111114
[testenv:docs]
112115
deps =
113116
sphinx

0 commit comments

Comments
 (0)