From 5553e31633fdb3107cb0bfd547d8cf3d2b5d14cf Mon Sep 17 00:00:00 2001 From: "Michael Hirsch, Ph.D" Date: Tue, 14 Aug 2018 22:59:29 -0400 Subject: [PATCH] CI template --- .appveyor.yml | 12 +++++++----- .travis.yml | 20 ++++++++++---------- setup.cfg | 22 +++++++++++----------- 3 files changed, 28 insertions(+), 26 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 309d620..dc1edee 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -5,14 +5,16 @@ image: stack: python 3 environment: - PY_DIR: C:\Python36-x64 + PY_DIR: C:\Python37-x64 clone_depth: 3 -before_build: +build: off + +init: - cmd: set PATH=%PY_DIR%;%PY_DIR%\Scripts;%PATH% -build_script: pip install -e .[tests] - -after_build: pytest -sv +install: pip install -e .[tests] + +test_script: pytest -rsv diff --git a/.travis.yml b/.travis.yml index 68565dd..d4d5406 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,11 +9,11 @@ git: quiet: true python: - - 3.6 - - 3.7 +- 3.6 +- 3.7 os: - - linux +- linux # - osx #env: @@ -39,13 +39,13 @@ os: install: pip install -e .[tests] script: - - pytest -sv - - flake8 - - mypy . --ignore-missing-imports +- pytest -rsv +- flake8 +- mypy . --ignore-missing-imports after_success: - - if [[ $TRAVIS_PYTHON_VERSION == 3.6* ]]; then - pytest --cov; - coveralls; - fi +- if [[ $TRAVIS_PYTHON_VERSION == 3.6* ]]; then + pytest --cov --cov-config=setup.cfg; + coveralls; + fi diff --git a/setup.cfg b/setup.cfg index cbaa3bd..5c45fba 100644 --- a/setup.cfg +++ b/setup.cfg @@ -4,7 +4,7 @@ version = 1.0.8 author = Michael Hirsch, Ph.D. url = https://github.com/scivision/findssh description = find open servers on your IPv4 subnet, e.g. SSH -keywords = +keywords = port-scan ssh classifiers = @@ -23,7 +23,7 @@ long_description_content_type = text/markdown [options] python_requires = >= 3.6 -setup_requires = +setup_requires = setuptools >= 38.6 pip >= 10 twine >= 1.11 @@ -32,7 +32,7 @@ packages = find: install_requires = [options.extras_require] -tests = +tests = pytest pytest-cov coveralls @@ -59,12 +59,12 @@ omit = exclude_lines = pragma: no cover def __repr__ - RuntimeError - NotImplementedError - ImportError - KeyError - FileNotFoundError - CalledProcessError + except RuntimeError + except NotImplementedError + except ImportError + except FileNotFoundError + except CalledProcessError logging.warning - ValueError - TypeError + logging.error + logging.critical + if __name__ == .__main__.: