From 1430bcbd7c2addfffd3e5f5c808f52c15ab4cd67 Mon Sep 17 00:00:00 2001 From: "bear (Mike Taylor)" Date: Mon, 1 Aug 2016 03:04:47 -0400 Subject: [PATCH] update tox environment and tweak Makefile and circle.yml file --- .travis.yml | 18 ------------------ Makefile | 18 +++++++++++------- circle.yml | 1 - pytest.ini | 8 ++++++++ requirements.testing.txt | 2 ++ tox.ini | 13 +++++++++++-- 6 files changed, 32 insertions(+), 28 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 2320b890..00000000 --- a/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -language: python -sudo: false -python: - - "2.7" - - "3.5" - -before_install: - - pip install codecov - -install: - - travis_retry pip install . - - pip install -r requirements.testing.txt - -script: - - make test - -after_success: - - codecov diff --git a/Makefile b/Makefile index 14395558..c68820c3 100644 --- a/Makefile +++ b/Makefile @@ -8,14 +8,15 @@ help: @echo " test run tests" @echo " coverage run tests with code coverage" -tox: - export PYENV_VERSION="2.7.11:3.5.1:pypy-5.0.0" && tox - env: - pip install -r requirements.txt + pip install -Ur requirements.txt dev: env - pip install -r requirements.testing.txt + pip install -Ur requirements.testing.txt + pyenv install -s 2.7.11 + pyenv install -s 3.5.2 + pyenv install -s pypy-5.3 + pyenv local 2.7.11 3.5.2 pypy-5.3 info: @python --version @@ -35,15 +36,18 @@ docs: lint: flake8 twitter > violations.flake8.txt -test: +test: lint python setup.py test +tox: clean + export PYENV_VERSION="2.7.11:3.5.1:pypy-5.0.0" && tox + coverage: clean coverage run --source=twitter setup.py test --addopts "--ignore=venv" coverage html coverage report -ci: info coverage +ci: tox coverage CODECOV_TOKEN=`cat .codecov-token` codecov build: clean diff --git a/circle.yml b/circle.yml index 9dfb3709..3c318ad5 100644 --- a/circle.yml +++ b/circle.yml @@ -1,4 +1,3 @@ - dependencies: override: - pip install -U pip diff --git a/pytest.ini b/pytest.ini index 10e0b3b5..f1addc14 100644 --- a/pytest.ini +++ b/pytest.ini @@ -4,3 +4,11 @@ norecursedirs= */python?.?/* */site-packages/* .tox/* + +with-coverage = true +cover-package = twitter +cover-html = true +cover-html-dir = htmlcov +cover-erase = true +cover-inclusive = true +cover-branches = true diff --git a/requirements.testing.txt b/requirements.testing.txt index 1d1fb65f..e2c63161 100644 --- a/requirements.testing.txt +++ b/requirements.testing.txt @@ -14,3 +14,5 @@ coverage coveralls codecov check-manifest +tox +tox-pyenv \ No newline at end of file diff --git a/tox.ini b/tox.ini index 7a54e2e0..b490ecec 100644 --- a/tox.ini +++ b/tox.ini @@ -1,9 +1,18 @@ [tox] -envlist = py27, py35 +envlist = py27,py35,pypy,pypy3,codestyle +skip_missing_interpreters = True [testenv] -deps = -rrequirements.testing.txt +deps = -Ur{toxinidir}/requirements.txt + -Ur{toxinidir}/requirements.testing.txt + commands = make test + whitelist_externals = /bin/bash make +setenv = + PYTHONWARNINGS=always::DeprecationWarning +[testenv:codestyle] +deps = pycodestyle +commands = pycodestyle --ignore=E501 twitter tests