Skip to content

Commit

Permalink
Changed service:app to wsgi:app
Browse files Browse the repository at this point in the history
  • Loading branch information
rofrano committed Sep 2, 2023
1 parent f5a6225 commit e35a6c2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
- ..:/app
command: sleep infinity
environment:
FLASK_APP: service:app
FLASK_APP: wsgi:app
FLASK_DEBUG: "True"
GUNICORN_BIND: "0.0.0.0:8000"
DATABASE_URI: postgresql://postgres:postgres@postgres:5432/postgres
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
34 changes: 0 additions & 34 deletions setup.cfg
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'

0 comments on commit e35a6c2

Please sign in to comment.