standard test configuration
add branch coverage and codecov
This commit is contained in:
parent
5ffbf8e571
commit
8261ac0fb7
11
.coveragerc
Normal file
11
.coveragerc
Normal file
@ -0,0 +1,11 @@
|
||||
[run]
|
||||
branch = True
|
||||
source =
|
||||
jinja2
|
||||
tests
|
||||
|
||||
[paths]
|
||||
source =
|
||||
jinja2
|
||||
.tox/*/lib/python*/site-packages/jinja2
|
||||
.tox/pypy/site-packages/jinja2
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@ -12,3 +12,6 @@ dist/
|
||||
.idea/
|
||||
venv/
|
||||
venv-*/
|
||||
.coverage
|
||||
.coverage.*
|
||||
htmlcov
|
||||
|
||||
29
.travis.yml
29
.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
|
||||
|
||||
@ -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
|
||||
|
||||
39
tox.ini
39
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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user