diff --git a/.travis.yml b/.travis.yml index 5c99348..f96538c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,20 +1,9 @@ language: python - python: -- 2.7 - + - 2.7 install: -- pip install -r requirements-dev.txt -- pip install . - -script: -- py.test -- pylama . - -after_success: - - coveralls - - if [ $TRAVIS_TAG ]; then curl -X POST https://readthedocs.org/build/napalm; fi - + - pip install tox-travis + - pip install coveralls deploy: provider: pypi user: dbarroso @@ -23,3 +12,8 @@ deploy: on: tags: true branch: master +script: + - tox +after_success: + - coveralls + - if [ $TRAVIS_TAG ]; then curl -X POST https://readthedocs.org/build/napalm; fi diff --git a/requirements-dev.txt b/requirements-dev.txt index 0f1c9d3..28df03e 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,3 +1,4 @@ +coveralls pytest pytest-cov pytest-json diff --git a/setup.cfg b/setup.cfg index c338e58..564f110 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,15 +1,15 @@ [pylama] linters = mccabe,pep8,pyflakes ignore = D203,C901 +skip = build/*,.tox/* [pylama:pep8] max_line_length = 100 -[tool:pytest] -addopts = --cov=./ -vs +[pytest] +addopts = --cov=napalm_fortios --cov-report term-missing -vs --pylama json_report = report.json jsonapi = true [coverage:run] -include = - napalm_fortios/* +source = napalm_fortios diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..910c4f4 --- /dev/null +++ b/tox.ini @@ -0,0 +1,9 @@ +[tox] +envlist = py27 + +[testenv] +deps = + -rrequirements-dev.txt + +commands= + py.test