-
Notifications
You must be signed in to change notification settings - Fork 7
/
run.sh
51 lines (50 loc) · 1.26 KB
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
case "$1" in
one)
PUB=true E2E=true coverage run -m unittest tests.$2
;;
test)
coverage run -m unittest && coverage report && coverage html
if [ "$2" = "-v" ]; then
open htmlcov/index.html
fi
;;
all)
PUB=true E2E=true coverage run -m unittest && coverage report && coverage html
if [ "$2" = "-v" ]; then
open htmlcov/index.html
fi
;;
e2e)
E2E=true coverage run -m unittest tests.test_e2e && coverage report && coverage html
if [ "$2" = "-v" ]; then
open htmlcov/index.html
fi
;;
pub)
PUB=true coverage run -m unittest tests.test_publish && coverage report && coverage html
if [ "$2" = "-v" ]; then
open htmlcov/index.html
fi
;;
docs)
pydoc-markdown --bootstrap mkdocs
pydoc-markdown --bootstrap readthedocs
pydoc-markdown --server --open
;;
*)
echo ""
echo "usage: sh run.sh <command> [-v]"
echo ""
echo "where <command> is one of the following:"
echo ""
echo " test -- to run only unit tests"
echo " e2e -- to run only end-to-end tests"
echo " pub -- to run only publishing tests"
echo " all -- to run unit, end-to-end, and publishing tests"
echo " docs -- to generate documentation"
echo ""
echo "When running tests, use -v to open the coverage report in your browser."
echo ""
;;
esac