Skip to content

Commit 8543212

Browse files
committed
Unify and simplify CI
1 parent 69aa808 commit 8543212

20 files changed

+88
-198
lines changed

.azure_pipelines/run_tests.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626

2727
- script: |
2828
python -m pip install --upgrade pip
29-
pip install -U setuptools virtualenv
29+
pip install -U setuptools virtualenv wheel
3030
displayName: upgrade pip and setuptools
3131
3232
- script: |
@@ -44,9 +44,9 @@ jobs:
4444
displayName: Build and install
4545
4646
- script: |
47-
pip install asynctest mock pytest pytest-mock pytest-asyncio pytest-sugar pytest-cov
47+
pip install asynctest mock pytest pytest-mock pytest-asyncio pytest-sugar pytest-cov coverage[toml]>=5.0
4848
49-
pytest --junitxml=unit_result.xml --cov=exec_helpers --cov-report=xml --cov-report=html --cov-report term test
49+
pytest --junitxml=unit_result.xml --cov=exec_helpers --cov-report=xml --cov-report term
5050
displayName: PyTest
5151
5252
- task: PublishTestResults@2
@@ -62,4 +62,3 @@ jobs:
6262
inputs:
6363
codeCoverageTool: Cobertura
6464
summaryFileLocation: ${{ format('$(System.DefaultWorkingDirectory)/coverage.xml') }}
65-
reportDirectory: ${{ format('$(System.DefaultWorkingDirectory)/htmlcov') }}

.coveragerc

Lines changed: 0 additions & 38 deletions
This file was deleted.

.github/workflows/pythonpackage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ jobs:
2222
run: |
2323
python -m pip install --upgrade pip wheel
2424
pip install -r CI_REQUIREMENTS.txt
25-
pip install --upgrade asynctest mock pytest pytest-mock pytest-asyncio pytest-sugar pytest-cov
25+
pip install --upgrade asynctest mock pytest pytest-mock pytest-asyncio pytest-sugar pytest-cov coverage[toml]>=5.0
2626
- name: Build package and install develop
2727
run: |
2828
python setup.py develop -v
2929
- name: Test with pytest
3030
run: |
31-
py.test --cov-config .coveragerc --cov-report= --cov=exec_helpers test
31+
py.test --cov-report= --cov=exec_helpers test
3232
coverage report -m --fail-under 85

.pydocstyle.ini

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[pydocstyle]
2+
ignore =
3+
D401,
4+
# First line should be in imperative mood; try rephrasing
5+
D202,
6+
# No blank lines allowed after function docstring
7+
D203,
8+
# 1 blank line required before class docstring
9+
D213
10+
# Multi-line docstring summary should start at the second line
11+
match = (?!_version|test_)*.py

.travis.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
language: python
22
os: linux
3-
dist: xenial
4-
sudo: true
3+
dist: bionic
54

65
install:
76
- &upgrade_python_toolset pip install --upgrade pip setuptools wheel
8-
- &install_test_deps pip install --upgrade asynctest mock pytest pytest-mock pytest-asyncio pytest-sugar
7+
- &install_test_deps pip install --upgrade asynctest mock pytest pytest-mock pytest-asyncio pytest-sugar coverage[toml]>=5.0
98
- &install_deps pip install -r CI_REQUIREMENTS.txt
109
- pip install --upgrade pytest-cov coveralls
1110

@@ -21,24 +20,19 @@ _python:
2120
python: "3.8"
2221

2322
_helpers:
24-
- &build_package python setup.py bdist_wheel
23+
- &build_package python setup.py bdist_wheel clean
2524

2625
- &static_analysis
2726
stage: Static analysis
2827
<<: *python37
29-
after_success: skip
3028

3129
- &code_style_check
3230
stage: Code style check
3331
<<: *python37
34-
after_success: skip
3532

3633
script:
3734
- python setup.py develop -v
38-
- py.test --cov-config .coveragerc --cov=exec_helpers test
39-
40-
after_success:
41-
- coveralls
35+
- py.test --cov=exec_helpers
4236

4337
jobs:
4438
include:
@@ -49,7 +43,7 @@ jobs:
4943
- *install_deps
5044
- pip install --upgrade "pylint >= 2.3" isort[pyproject,requirements]
5145
script:
52-
- python setup.py --version
46+
- python setup.py --version clean
5347
- pylint exec_helpers
5448
- <<: *static_analysis
5549
name: "Bandit"
@@ -65,7 +59,7 @@ jobs:
6559
- *install_deps
6660
- pip install --upgrade "mypy >= 0.720"
6761
script:
68-
- python setup.py --version
62+
- python setup.py --version clean
6963
- mypy --strict exec_helpers
7064
- <<: *static_analysis
7165
name: "PEP8"
@@ -92,10 +86,16 @@ jobs:
9286

9387
- stage: test
9488
<<: *python36
89+
after_success:
90+
- coveralls
9591
- stage: test
9692
<<: *python37
93+
after_success:
94+
- coveralls
9795
- stage: test
9896
<<: *python38
97+
after_success:
98+
- coveralls
9999

100100
- stage: deploy
101101
# This prevents job from appearing in test plan unless commit is tagged:
@@ -108,20 +108,20 @@ jobs:
108108
install:
109109
- *upgrade_python_toolset
110110
- *install_deps
111+
- pip install -U --upgrade-strategy=eager --no-cache-dir twine
111112
before_deploy:
112-
- *build_package
113-
script: python setup.py bdist_wheel
113+
- pip install -U wheel
114+
script: *build_package
114115
deploy:
115116
- provider: pypi
116117
# `skip_cleanup: true` is required to preserve binary wheels, built
117-
# inside of manylinux1 docker container during `script` step above.
118118
skip_cleanup: true
119119
user: penguinolog
120120
password:
121121
secure: "maml4+SU/6NtRf7JIwWhVyXkesE9Gk5Umdo3txOjcrcvt84S3NlN/hFgdNclMUpJ3b+rOFEpiZOamtDKbP67uhlA6yJ364SxW5T3ZQJ8tjFFzMHcaM38HgGbgLR8AxK8fdZKRg9gVMnGofeiusB5aNsKmn9XnvESc8dNv0Umdmi83wXxm+DfVRXL8VTFgwsH3BxQy/Kdv6upRrXyNWkyoi8Zk8PkrFFDpFoW9WK1fRBqnvCw1Wt8nEAJah7y2b7vj52eM+MfT3IL+jpocZqOJQlFPdWkTonX7mAP9nB97kk4DMbm3ZqUw2Qr9pM0nKK9HhrXhsSSUGa1w95zmw9nbXLrpfnQ61Lyk9pGcVh60WbrVKstE/x9Lq3pqGsA/YKqsIZK3OAqRfBHNG9L7lekP05hXyDNHJXGoEyGQjVA/666S2ZCjM10XaaUmZ5P1kPGocCnEjv86dKdINTkFM6L0n4oIu1nyftBhVu9jz0xQaxute4LZNJiQtE6x8NX3WuSO68UhWjDqevYdRgW55Gp1OD4ilfA/SVNPpsHJfB2baue1fi9m8Rn3bWQSJoZ8twYHoIxEOAIXyMBhYnmldvsuUY6h5p+/hk6kpJAsTXZFjUSa/FPIH84QvDkNCoZxwInSkjEN1tj9PBep2vYcLMd92+g6udtin8FbYMZItiDl1M="
122122
on:
123123
tags: true
124-
distributions: sdist bdist_wheel
124+
distributions: sdist
125125
skip_upload_docs: true
126126
skip_existing: true
127127

azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
displayName: 'Install dependencies'
4848
4949
- script: |
50-
python setup.py --version
50+
python setup.py --version clean
5151
displayName: 'Generate version file'
5252
5353
- script: |

exec_helpers/_ssh_client_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
import tenacity # type: ignore
3737
import threaded
3838

39-
# Exec-Helpers Implementation
39+
# Package Implementation
4040
from exec_helpers import _log_templates
4141
from exec_helpers import _ssh_helpers
4242
from exec_helpers import api

exec_helpers/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
import threading
3939
import typing
4040

41-
# Exec-Helpers Implementation
41+
# Package Implementation
4242
from exec_helpers import constants
4343
from exec_helpers import exceptions
4444
from exec_helpers import exec_result

exec_helpers/async_api/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import pathlib
2727
import typing
2828

29-
# Exec-Helpers Implementation
29+
# Package Implementation
3030
from exec_helpers import api
3131
from exec_helpers import constants
3232
from exec_helpers import exceptions

exec_helpers/async_api/exec_result.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import logging
2525
import typing
2626

27-
# Exec-Helpers Implementation
27+
# Package Implementation
2828
from exec_helpers import exec_result
2929

3030

0 commit comments

Comments
 (0)