File tree Expand file tree Collapse file tree
backend/app/routes/api/v2 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323 - name : Set up Python
2424 uses : actions/setup-python@v4
2525 with :
26- python-version : " 3.11 "
26+ python-version : " 3.13 "
2727
2828 - name : Install backend dependencies
2929 run : |
4141
4242 - name : Verify Backend APIs
4343 run : |
44- python backend/app/routes/api/v1/health.py
44+ cd backend
45+ export PYTHONPATH=$(pwd)
46+ python app/routes/api/v2/verify_db.py
4547
4648 frontend-build :
4749 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 1+ import asyncio
2+ from motor .motor_asyncio import AsyncIOMotorClient
3+ from app .core .config import settings
4+
5+ async def verify ():
6+ print (f"Connecting to { settings .MONGODB_URL } ..." )
7+ try :
8+ client = AsyncIOMotorClient (settings .MONGODB_URL )
9+ await client .admin .command ('ping' )
10+ print ("SUCCESS: Connection verified!" )
11+ except Exception as e :
12+ print (f"FAILURE: { e } " )
13+
14+ if __name__ == "__main__" :
15+ asyncio .run (verify ())
You can’t perform that action at this time.
0 commit comments