-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
4 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,17 +51,16 @@ jobs: | |
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 service tests --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# check for omplexity. The GitHub editor is 127 chars wide | ||
# check for complexity. The GitHub editor is 127 chars wide | ||
flake8 service tests --count --max-complexity=10 --max-line-length=127 --statistics | ||
# Run pylint on the service | ||
pylint service tests --max-line-length=127 | ||
- name: Run unit tests with green | ||
run: | | ||
export FLASK_APP=service:app | ||
pytest | ||
run: pytest --disable-warnings | ||
env: | ||
DATABASE_URI: "postgresql://postgres:pgs3cr3t@postgres:5432/testdb" | ||
FLASK_APP: wsgi:app | ||
|
||
- name: Upload code coverage | ||
uses: codecov/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,4 @@ | ||
[green] | ||
verbose=3 | ||
processes=1 | ||
run-coverage=1 | ||
termcolor=1 | ||
minimum-coverage=95 | ||
junit-report=./unittests.xml | ||
|
||
[flake8] | ||
max-line-length = 127 | ||
per-file-ignores = | ||
*/__init__.py: F401 E402 | ||
|
||
[pylint.'MESSAGES CONTROL'] | ||
disable=E1101 | ||
|
||
[coverage:run] | ||
source = service | ||
omit = | ||
venv/* | ||
.venv/* | ||
|
||
[coverage:report] | ||
show_missing = true | ||
exclude_lines = | ||
pragma: no cover | ||
pragma: no branch | ||
pass | ||
subprocess.CalledProcessError | ||
sys.exit | ||
if __name__ == .__main__.: | ||
ignore_errors = true | ||
|
||
[coverage:xml] | ||
output=./coverage.xml | ||
|
||
[coverage:html] | ||
title = 'Test Coverage Report' |