-
Notifications
You must be signed in to change notification settings - Fork 613
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
8 changed files
with
58 additions
and
48 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
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 |
---|---|---|
|
@@ -17,7 +17,7 @@ on: | |
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
container: python:3.9-slim | ||
container: python:3.11-slim | ||
|
||
# Required services | ||
services: | ||
|
@@ -53,20 +53,18 @@ jobs: | |
- name: Linting | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
flake8 service tests --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 . --count --max-complexity=10 --max-line-length=127 --statistics | ||
flake8 service tests --count --max-complexity=10 --max-line-length=127 --statistics | ||
# Run pylint on the service | ||
pylint service | ||
pylint service tests --max-line-length=127 | ||
- name: Run unit tests with nose | ||
run: | | ||
export FLASK_APP=service:app | ||
nosetests | ||
green | ||
env: | ||
DATABASE_URI: "postgresql://postgres:pgs3cr3t@postgres:5432/testdb" | ||
|
||
- name: Upload code coverage | ||
uses: codecov/codecov-action@v2 | ||
with: | ||
version: "v0.1.13" | ||
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
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
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 |
---|---|---|
@@ -1,23 +1,38 @@ | ||
[nosetests] | ||
verbosity=2 | ||
with-spec=1 | ||
spec-color=1 | ||
with-coverage=1 | ||
cover-erase=1 | ||
cover-package=service | ||
exe=1 | ||
cover-xml=1 | ||
cover-xml-file=./coverage.xml | ||
# with-xunit=1 | ||
# xunit-file=./unittests.xml | ||
|
||
[coverage:report] | ||
show_missing = True | ||
[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' |