From df1a9f19e7394124ba5374282f6e8bcc2a9b275f Mon Sep 17 00:00:00 2001 From: Prince D Rusweka Rwabongoya Date: Sun, 27 Apr 2025 23:17:57 -0400 Subject: [PATCH] Update backend-ci.yml --- .github/workflows/backend-ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/backend-ci.yml b/.github/workflows/backend-ci.yml index 7f1bba1..021effc 100644 --- a/.github/workflows/backend-ci.yml +++ b/.github/workflows/backend-ci.yml @@ -31,6 +31,8 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Set up Python 3.11 uses: actions/setup-python@v5 @@ -47,6 +49,7 @@ jobs: - name: Run pylint on backend run: | + git fetch origin main changed_files=$(git diff --name-only origin/main...HEAD | grep '\.py$' || true) if [ -n "$changed_files" ]; then pylint $changed_files --exit-zero | tee pylint.log @@ -60,7 +63,7 @@ jobs: - name: Start backend server (background) run: | - uvicorn main:app --host 0.0.0.0 --port 8000 & + uvicorn main:app --host 0.0.0.0 --port 8000 || exit 1 & sleep 5 # Wait for server to start - name: Run pytest on backend (HTTP API tests)