From: David Lord Date: Thu, 6 Jul 2017 18:07:02 +0000 (-0700) Subject: standard test configuration X-Git-Tag: 2.10~18^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F738%2Fhead;p=thirdparty%2Fjinja.git standard test configuration add branch coverage and codecov --- diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 00000000..7cfb347d --- /dev/null +++ b/.coveragerc @@ -0,0 +1,11 @@ +[run] +branch = True +source = + jinja2 + tests + +[paths] +source = + jinja2 + .tox/*/lib/python*/site-packages/jinja2 + .tox/pypy/site-packages/jinja2 diff --git a/.gitignore b/.gitignore index d1b99f56..05d1207d 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,6 @@ dist/ .idea/ venv/ venv-*/ +.coverage +.coverage.* +htmlcov diff --git a/.travis.yml b/.travis.yml index efe88556..285333fd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,19 +2,32 @@ sudo: false language: python python: - - "2.6" - - "2.7" + - 3.6 + - 3.5 + - 3.4 + - 3.3 + - 2.7 + - 2.6 - pypy - - "3.3" - - "3.4" - - "3.5" - - "3.6" + +env: + - TOXENV=py,codecov + +matrix: + include: + - python: nightly + env: TOXENV=py + - python: 3.6 + env: TOXENV=docs-html install: - pip install tox script: - - tox -e py + - tox + +cache: + - pip branches: only: @@ -25,7 +38,7 @@ notifications: email: false irc: channels: - - chat.freenode.net#pocoo + - "chat.freenode.net#pocoo" on_success: change on_failure: always use_notice: true diff --git a/setup.cfg b/setup.cfg index e56f58ca..e9fc0a44 100644 --- a/setup.cfg +++ b/setup.cfg @@ -5,4 +5,5 @@ universal = 1 license_file = LICENSE [tool:pytest] -norecursedirs = .* *.egg *.egg-info env* artwork docs examples venv* +minversion = 3.0 +testpaths = tests diff --git a/tox.ini b/tox.ini index 03402f04..90818201 100644 --- a/tox.ini +++ b/tox.ini @@ -1,8 +1,39 @@ [tox] -envlist = py26,py27,pypy,py33,py34,py35,py36 +envlist = + py{36,35,34,33,27,26,py} + docs-html + coverage-report [testenv] -commands = py.test {posargs} - +passenv = LANG +usedevelop = true deps = - pytest + pytest>=3 + coverage + +commands = coverage run -p -m pytest {posargs} + +[testenv:docs-html] +deps = sphinx +commands = sphinx-build -W -b html -d {envtmpdir}/doctrees docs docs/_build/html + +[testenv:docs-linkcheck] +deps = sphinx +commands = sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees docs docs/_build/linkcheck + +[testenv:coverage-report] +deps = coverage +skip_install = true +commands = + coverage combine + coverage report + coverage html + +[testenv:codecov] +passenv = CI TRAVIS TRAVIS_* +deps = codecov +skip_install = true +commands = + coverage combine + coverage report + codecov