]> git.ipfire.org Git - thirdparty/jinja.git/commitdiff
standard test configuration 738/head
authorDavid Lord <davidism@gmail.com>
Thu, 6 Jul 2017 18:07:02 +0000 (11:07 -0700)
committerDavid Lord <davidism@gmail.com>
Thu, 6 Jul 2017 18:07:02 +0000 (11:07 -0700)
add branch coverage and codecov

.coveragerc [new file with mode: 0644]
.gitignore
.travis.yml
setup.cfg
tox.ini

diff --git a/.coveragerc b/.coveragerc
new file mode 100644 (file)
index 0000000..7cfb347
--- /dev/null
@@ -0,0 +1,11 @@
+[run]
+branch = True
+source =
+    jinja2
+    tests
+
+[paths]
+source =
+    jinja2
+    .tox/*/lib/python*/site-packages/jinja2
+    .tox/pypy/site-packages/jinja2
index d1b99f5685203e7c200d7e2d69aa9722ab13fde0..05d1207d40722480f2e0d5341dd183ef5bd9652d 100644 (file)
@@ -12,3 +12,6 @@ dist/
 .idea/
 venv/
 venv-*/
+.coverage
+.coverage.*
+htmlcov
index efe88556a0793d4bf41774a7f49668ca9126a9bd..285333fd5b89d4c1472249ad3dd63cd656734345 100644 (file)
@@ -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
index e56f58cae76b68b11d9ec1c1e06a4f4dec8505bc..e9fc0a44c57252d08e74ccf95d07854f4a6f5099 100644 (file)
--- 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 03402f043c0e4114d4c810726903d1ad30b7fb71..9081820161307d6a06d91b54ff8356a1185ec78c 100644 (file)
--- 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