summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAngel Velásquez <angvp@archlinux.org>2017-05-18 03:12:06 -0400
committerGitHub <noreply@github.com>2017-05-18 03:12:06 -0400
commit1afe9133f1e221654cba90c252246734a23379bc (patch)
treee3366246d56b69a7599aea306c05cc2116c4432d
parenta9dcbbd1aa69e06e8373a7f0836fbc8a12d54b86 (diff)
parent5922d9321a10bdf32c46b543ae13008faec2ae76 (diff)
downloadarchweb-1afe9133f1e221654cba90c252246734a23379bc.tar.gz
archweb-1afe9133f1e221654cba90c252246734a23379bc.zip
Merge pull request #17 from jelly/coverage
README: describe running unit tests / coverage
-rw-r--r--.travis.yml7
-rw-r--r--README.md14
2 files changed, 19 insertions, 2 deletions
diff --git a/.travis.yml b/.travis.yml
index 81cef987..4757641f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,8 +1,11 @@
language: python
python:
- "2.7"
-install: "pip install -r requirements.txt"
+install: "pip install -r requirements.txt && pip install coveralls"
script:
- python manage.py collectstatic --noinput
- - python manage.py test
+ - coverage run --omit='env*' --source='.' manage.py test
+
+after_success:
+ - coveralls
diff --git a/README.md b/README.md
index 1f251647..48249ac1 100644
--- a/README.md
+++ b/README.md
@@ -85,6 +85,20 @@ required. A simple debugging SMTP server can be setup using Python.
In local_settings.py change the EMAIL_HOST to 'localhost' and the EMAIL_PORT to
1025.
+# Running tests and coverage
+
+To the unittests execute the following commands:
+
+ ./manage.py collectstatic --noinput
+ ./manage.py test
+
+Running coverage:
+
+ pip install coverage
+ coverage run --omit='env*' --source='.' manage.py test
+ coverage report
+
+
# Production Installation
Ask someone who knows, or you are going to be in trouble.