Skip to content

Commit 5bbc9c3

Browse files
committed
Show test code coverage publicly.
1 parent da2b0f0 commit 5bbc9c3

File tree

5 files changed

+56
-38
lines changed

5 files changed

+56
-38
lines changed

.coveragerc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[run]
2+
source = debug_toolbar
3+
branch = 1
4+
5+
[report]
6+
omit = *tests*,*migrations*

.travis.yml

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
11
language: python
22
sudo: false
3-
python:
4-
- "2.7"
5-
- "3.3"
6-
- "3.4"
7-
- "3.5"
3+
python: 3.5
4+
cache:
5+
directories:
6+
- "~/.cache/pip"
87
env:
9-
- DJANGO="Django>=1.8.0,<1.9.0"
10-
- DJANGO="Django>=1.9.0,<1.10.0"
11-
- DJANGO="Django>=1.10a,<1.11.0"
12-
matrix:
13-
exclude:
14-
- python: "3.3"
15-
env: DJANGO="Django>=1.9.0,<1.10.0"
16-
- python: "3.3"
17-
env: DJANGO="Django>=1.10a,<1.11.0"
18-
- python: "3.5"
19-
env: DJANGO="Django>=1.8.0,<1.9.0"
8+
- TOXENV="py27-dj18"
9+
- TOXENV="py33-dj18"
10+
- TOXENV="py34-dj18"
11+
- TOXENV="py27-dj19"
12+
- TOXENV="py27-dj110"
13+
- TOXENV="py34-dj19"
14+
- TOXENV="py34-dj110"
15+
- TOXENV="py35-dj19"
16+
- TOXENV="py35-dj110"
17+
- TOXENV="flake8"
18+
- TOXENV="isort"
19+
- TOXENV="readme"
2020
install:
21-
- travis_retry pip install sqlparse
22-
- travis_retry pip install --pre $DJANGO
23-
- pip install -e .
21+
- pip install tox codecov
2422
script:
25-
- make jshint
26-
- make test
23+
- tox -v
24+
after_success:
25+
- codecov

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ test_selenium:
3030
coverage:
3131
coverage erase
3232
DJANGO_SETTINGS_MODULE=tests.settings \
33-
coverage run --branch --source=debug_toolbar `which django-admin` test tests
33+
coverage run `which django-admin` test -v2 tests
34+
coverage report
3435
coverage html
3536

3637
translatable_strings:

README.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ Django Debug Toolbar
1010
:target: https://travis-ci.org/jazzband/django-debug-toolbar
1111
:alt: Build Status
1212

13+
.. image:: https://codecov.io/gh/jazzband/django-debug-toolbar/branch/master/graph/badge.svg
14+
:target: https://codecov.io/gh/jazzband/django-debug-toolbar
15+
:alt: Test coverage status
16+
1317
The Django Debug Toolbar is a configurable set of panels that display various
1418
debug information about the current request/response and when clicked, display
1519
more details about the panel's content.

tox.ini

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,46 @@
11
[tox]
22
envlist =
3-
py{27,33,34}-django18,
4-
py{27,34,35}-django{19,110},
3+
py{27,33,34}-dj18,
4+
py{27,34,35}-dj{19,110},
55
flake8,
6-
isort
6+
isort,
7+
readme
78

89
[testenv]
910
basepython =
1011
py27: python2.7
1112
py33: python3.3
1213
py34: python3.4
1314
py35: python3.5
14-
commands = make test
1515
deps =
16-
django18: Django>=1.8,<1.9
17-
django19: Django>=1.9,<1.10
18-
django110: Django>=1.10a,<1.11
16+
dj18: Django>=1.8,<1.9
17+
dj19: Django>=1.9,<1.10
18+
dj110: Django>=1.10a,<1.11
19+
coverage
1920
selenium
2021
sqlparse
2122
setenv =
2223
PYTHONPATH = {toxinidir}
2324
whitelist_externals = make
24-
pip_pre=True
25+
pip_pre = True
26+
usedevelop = true
27+
commands = make coverage
2528

2629
[testenv:flake8]
27-
basepython =
28-
python2.7
30+
basepython = python2.7
2931
commands = make flake8
30-
deps =
31-
flake8
32+
deps = flake8
3233

3334
[testenv:isort]
34-
basepython =
35-
python2.7
35+
basepython = python2.7
3636
commands = make isort_check_only
37-
deps =
38-
isort
37+
deps = isort
38+
39+
[testenv:jshint]
40+
basepython = python2.7
41+
commands = make jshint
42+
43+
[testenv:readme]
44+
basepython = python2.7
45+
commands = python setup.py check -r -s
46+
deps = readme_renderer

0 commit comments

Comments
 (0)