forked from octodns/octodns
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcoverage
executable file
·36 lines (31 loc) · 830 Bytes
/
coverage
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
#!/bin/sh
set -e
cd "$(dirname "$0")/.."
if [ -z "$VENV_NAME" ]; then
VENV_NAME="env"
fi
ACTIVATE="$VENV_NAME/bin/activate"
if [ ! -f "$ACTIVATE" ]; then
echo "$ACTIVATE does not exist, run ./script/bootstrap" >&2
exit 1
fi
. "$ACTIVATE"
# Just to be sure/safe
export AWS_ACCESS_KEY_ID=
export AWS_SECRET_ACCESS_KEY=
export CLOUDFLARE_EMAIL=
export CLOUDFLARE_TOKEN=
export DNSIMPLE_ACCOUNT=
export DNSIMPLE_TOKEN=
export DYN_CUSTOMER=
export DYN_PASSWORD=
export DYN_USERNAME=
export GOOGLE_APPLICATION_CREDENTIALS=
coverage run --branch --source=octodns --omit=octodns/cmds/* "$(command -v nosetests)" --with-xunit "$@"
coverage html
coverage xml
coverage report --show-missing
coverage report | grep ^TOTAL | grep -qv 100% && {
echo "Incomplete code coverage" >&2
exit 1
} || echo "Code coverage 100%"