-
Notifications
You must be signed in to change notification settings - Fork 25
/
test.sh
executable file
·40 lines (33 loc) · 724 Bytes
/
test.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
#!/bin/bash
# For running tests locally (not Docker, not Tox) with all dependencies already installed
coverage run --parallel-mode -m pytest tests/unit tests/integration "$@"
RET=$?
coverage combine
ret_sub=$?
if [[ $ret_sub -gt 0 ]] && [[ $RET -eq 0 ]]
then
RET=$ret_sub
fi
coverage report
ret_sub=$?
if [[ $ret_sub -gt 0 ]]
then
if [[ $ret_sub -eq 2 ]]
then
echo "ERROR: Coverage report failed due to insufficient coverage"
else
echo "ERROR: Coverage report failed for unknown reasons"
fi
if [[ $RET -eq 0 ]]
then
RET=$ret_sub
fi
fi
echo "Inspecting code..."
./lint.sh
ret_sub=$?
if [[ $ret_sub -gt 0 ]] && [[ $RET -eq 0 ]]
then
RET=$ret_sub
fi
exit $RET