From 81403c2ec906baa4149b6415d5944ec1d7b229bd Mon Sep 17 00:00:00 2001 From: Petr Klima Date: Wed, 4 Nov 2020 15:22:47 +0000 Subject: [PATCH] clean test environment --- .github/workflows/python-TESTpublish.yml | 2 +- pylama.ini | 6 ---- setup.cfg | 1 - tox.ini | 45 ++++++++++++++++++++++-- 4 files changed, 43 insertions(+), 11 deletions(-) delete mode 100644 pylama.ini diff --git a/.github/workflows/python-TESTpublish.yml b/.github/workflows/python-TESTpublish.yml index ccb1d01..b866d4b 100644 --- a/.github/workflows/python-TESTpublish.yml +++ b/.github/workflows/python-TESTpublish.yml @@ -1,7 +1,7 @@ # This workflows will upload a Python Package using Twine when a release is created # For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries -name: Testing Upload Python Package to TEST.PyPi.org +name: Test before push on: push: diff --git a/pylama.ini b/pylama.ini deleted file mode 100644 index 3146a20..0000000 --- a/pylama.ini +++ /dev/null @@ -1,6 +0,0 @@ -[pylama] -linters = mccabe,pep257,pep8,pyflakes -ignore = D203, - -[pylama:pep8] -max_line_length = 120 diff --git a/setup.cfg b/setup.cfg index 26e138d..5d63bd6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -32,4 +32,3 @@ include = [coverage:report] omit = - napalm_s350/test/* diff --git a/tox.ini b/tox.ini index 439cc3a..349ba0f 100644 --- a/tox.ini +++ b/tox.ini @@ -1,9 +1,48 @@ [tox] -envlist = py36,py37,py38 +envlist = py3{6,7,8},black,pylama +skip_missing_interpreters = true + +[travis] +python = + 3.6: py36,black,pylama + +[travis:env] +TRAVIS_BUILD_STAGE_NAME = + Lint: black,pylama + Test: py3{6,7,8} [testenv] deps = -rrequirements.txt -rrequirements-dev.txt -#commands = -# py.test {posargs} +passenv = * + +commands = + py.test --cov=napalm_s350 --cov-report term-missing -vs {posargs} + +[testenv:black] +deps = black==18.9b0 + +basepython = python3.6 +commands = + black --check . + +[testenv:pylama] +deps = + -rrequirements-dev.txt + +basepython = python3.6 +commands = + pylama . + +[testenv:sphinx] +deps = + -rdocs/requirements.txt + +basepython = python3.6 + +commands = + make doctest + +whitelist_externals = + make