summaryrefslogtreecommitdiffhomepage
path: root/tasks.py
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2021-10-01 21:04:34 -0400
committerJeff Forcier <jeff@bitprophet.org>2021-10-01 22:04:36 -0400
commitaac13fb192d3f4a5ca01026aa544d29a2c0dcfb1 (patch)
tree580ad40e31648606526ad7488c92f611786771ff /tasks.py
parent2160deed9135e3a45294ed3a5b4c7215a0c83567 (diff)
Codecov support
Diffstat (limited to 'tasks.py')
-rw-r--r--tasks.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tasks.py b/tasks.py
index 3d2fdf65..bfa43ae8 100644
--- a/tasks.py
+++ b/tasks.py
@@ -75,11 +75,15 @@ def test(
@task
-def coverage(ctx, opts=""):
+def coverage(ctx, opts="", codecov=False):
"""
Execute all tests (normal and slow) with coverage enabled.
"""
- return test(ctx, coverage=True, include_slow=True, opts=opts)
+ test(ctx, coverage=True, include_slow=True, opts=opts)
+ # Cribbed from invocations.pytest.coverage for now
+ if codecov:
+ ctx.run("coverage xml")
+ ctx.run("codecov")
@task