From 891c764a654276bae2a80aa35bd28e2e36bbd8a7 Mon Sep 17 00:00:00 2001 From: Devasy Patel <110348311+Devasy23@users.noreply.github.com> Date: Thu, 11 Jan 2024 01:14:04 +0530 Subject: [PATCH] Add FastAPI server startup and delay for initialization --- .github/workflows/python-app.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index e4c2afe..aa40d04 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -29,6 +29,11 @@ jobs: pip install flake8 pytest if [ -f requirements.txt ]; then pip install -r requirements.txt; fi uvicorn main:app --reload + - name: Start FastAPI server + run: | + uvicorn main:app --reload & + sleep 10 # Give FastAPI some time to start + shell: bash - name: Lint with flake8 run: | # stop the build if there are Python syntax errors or undefined names