[QG] Add quality gates on main branch
[+] add lint pipeline for ruff isort and black checks [+] add types pipeline for mypy check [+] add tests pipeline for pytest check with coverage less 70% blocker QG [+] add some tests fo QG pass
This commit is contained in:
0
app/__init__.py
Normal file
0
app/__init__.py
Normal file
BIN
app/__pycache__/__init__.cpython-313.pyc
Normal file
BIN
app/__pycache__/__init__.cpython-313.pyc
Normal file
Binary file not shown.
BIN
app/__pycache__/main.cpython-313.pyc
Normal file
BIN
app/__pycache__/main.cpython-313.pyc
Normal file
Binary file not shown.
22
app/main.py
Normal file
22
app/main.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from contextlib import asynccontextmanager
|
||||
|
||||
import uvicorn
|
||||
from fastapi import FastAPI
|
||||
|
||||
|
||||
@asynccontextmanager
|
||||
async def lifespan(app: FastAPI):
|
||||
yield
|
||||
|
||||
|
||||
def app_factory():
|
||||
app = FastAPI(lifespan=lifespan)
|
||||
return app
|
||||
|
||||
|
||||
def main():
|
||||
uvicorn.run(app_factory, factory=True, host="0.0.0.0", port=8000)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user