Skip to content

Commit 7c6e073

Browse files
committed
Coverage & Coveralls
1 parent dfbb876 commit 7c6e073

File tree

4 files changed

+22
-3
lines changed

4 files changed

+22
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ doc/_build
1919
/reports
2020
/venv
2121
.tox
22+
.coverage

.travis.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,8 @@ matrix:
1515
env: DJANGO='django>=1.4,<1.5'
1616
install:
1717
- pip install $DJANGO pep8 --use-mirrors
18-
# command to run tests
19-
script: make test pep8
18+
- pip install coveralls --use-mirrors
19+
script:
20+
- make coverage pep8
21+
after_success:
22+
- coveralls

Makefile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ help:
1010
@echo 'Usage: '
1111
@echo ' make serve Run the test server '
1212
@echo ' make test Run the test suite '
13+
@echo ' make coverage Run a caoverage report from the test suite '
1314
@echo ' make pep8 Run the PEP8 report '
15+
@echo ' make pylint Run the pylint report '
1416
@echo ' make doc Generate the documentation '
1517
@echo ' make dist Generate a distributable package '
16-
@echo ' make minify Minify Django.js with yuglify '
18+
@echo ' make minify Minify Django.js with yuglify '
1719
@echo ' make clean Remove all temporary and generated artifacts'
1820
@echo ' '
1921

@@ -26,9 +28,16 @@ test:
2628
@echo 'Running test suite'
2729
@python manage.py test $(suite)
2830

31+
coverage:
32+
@echo 'Running test suite with coverage'
33+
@coverage run --rcfile=coverage.rc manage.py test $(suite)
34+
2935
pep8:
3036
@pep8 $(PACKAGE) --max-line-length=120 --ignore=E128,E122,E125 && echo 'PEP8: OK'
3137

38+
pylint:
39+
@pylint --rcfile=pylint.rc $(PACKAGE)
40+
3241
doc:
3342
@echo 'Generating documentation'
3443
@cd $(DOCDIR) && make html

coverage.rc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[run]
2+
source = djangojs
3+
branch = True
4+
omit =
5+
*/fake/*
6+

0 commit comments

Comments
 (0)