-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck_app.sh
More file actions
executable file
·22 lines (17 loc) · 828 Bytes
/
check_app.sh
File metadata and controls
executable file
·22 lines (17 loc) · 828 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
# Linter checks
# stop the build if there are Python syntax errors or undefined names
echo "***** Linter: Checking Python syntax errors *****"
flake8 main.py --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
echo "***** Linter: Checking Python syntax patterns *****"
flake8 main.py --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
# Unit test and coverage
echo "***** Unit Test *****"
coverage run -m pytest -v
echo "***** Coverage tests *****"
coverage report --omit="*/tests/*,*/venv/*" -m ./*.py
# Coverage report in html
# coverage run -m pytest -v && coverage html --omit="*/test/*,*/venv/*"
# With param -s for input
# coverage run -m pytest - v -s && coverage html --omit="*/test/*,*/venv/*"