summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2014-02-11 09:31:43 -0800
committerJeff Forcier <jeff@bitprophet.org>2014-02-11 09:31:43 -0800
commit2d3b13e91705a2940f8af0c3d363190bee85ea0d (patch)
tree35900c9dec4d42fb73e70734bbb77790e4e43444
parent675e30986e3aa2882093b8c983a93619f61a019d (diff)
Add coverage command as Invoke task
-rw-r--r--.gitignore1
-rw-r--r--.travis.yml2
-rw-r--r--tasks.py6
3 files changed, 7 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index 9e1febf3..e149bb8c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@ test.log
docs/
!sites/docs
_build
+.coverage
diff --git a/.travis.yml b/.travis.yml
index df7c225a..97165c47 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -10,7 +10,7 @@ install:
- pip install -r dev-requirements.txt
script:
# Main tests, with coverage!
- - coverage run --source=paramiko test.py --verbose
+ - invoke coverage
# Ensure documentation & invoke pipeline run OK.
# Run 'docs' first since its objects.inv is referred to by 'www'.
# Also force warnings to be errors since most of them tend to be actual
diff --git a/tasks.py b/tasks.py
index 79cb94f0..f8f4017d 100644
--- a/tasks.py
+++ b/tasks.py
@@ -26,5 +26,9 @@ www = Collection.from_module(_docs, name='www', config={
def test(ctx):
ctx.run("python test.py --verbose")
+@task
+def coverage(ctx):
+ ctx.run("coverage run --source=paramiko test.py --verbose")
+
-ns = Collection(test, docs=docs, www=www)
+ns = Collection(test, coverage, docs=docs, www=www)