forked from JeetShetty/GreenPiThumb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build
executable file
·28 lines (23 loc) · 653 Bytes
/
build
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
#!/bin/bash
#
# Build script to validate greenpithumb
# Exit build script on first failure
set -e
# Run unit tests and calculate code coverage.
coverage run \
--source greenpithumb \
--omit "greenpithumb/dht11/*" \
-m unittest discover
# Run static analysis for Python bugs/cruft.
pyflakes greenpithumb/*.py tests/*.py
# Check that source has correct formatting.
yapf \
--diff \
--recursive \
--style google \
./ \
--exclude "./greenpithumb/dht11/*" \
--exclude "./third_party/*"
# Check that docstrings are formatted correctly.
PYTHONPATH=$PYTHONPATH:$(pwd)/third_party/docstringchecker \
pylint --reports=n greenpithumb tests