Skip to content

Commit 17d1471

Browse files
authored
Merge pull request #600 from FalkorDB/fix/playwright-ci-cleanup
fix(ci): stop Flask server before uv cache cleanup
2 parents be12eda + 67e0c0c commit 17d1471

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

.github/workflows/playwright.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,17 +81,30 @@ jobs:
8181
npx playwright install chromium firefox
8282
npx playwright install-deps chromium firefox
8383
84-
- name: Run Playwright tests
84+
- name: Start Flask server
85+
id: start-server
8586
env:
8687
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
8788
SECRET_TOKEN: ${{ secrets.SECRET_TOKEN }}
8889
CODE_GRAPH_PUBLIC: "1"
8990
MODEL_NAME: "openai/gpt-4.1-mini"
9091
run: |
9192
uv run flask --app api/index.py run --host 0.0.0.0 --port 5000 &
93+
echo "pid=$!" >> "$GITHUB_OUTPUT"
9294
# Wait for Flask to be ready
9395
timeout 30 bash -c 'until curl -s http://localhost:5000/ > /dev/null 2>&1; do sleep 0.5; done'
94-
npx playwright test --shard=${{ matrix.shard }}/2 --reporter=dot,list
96+
97+
- name: Run Playwright tests
98+
env:
99+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
100+
SECRET_TOKEN: ${{ secrets.SECRET_TOKEN }}
101+
CODE_GRAPH_PUBLIC: "1"
102+
MODEL_NAME: "openai/gpt-4.1-mini"
103+
run: npx playwright test --shard=${{ matrix.shard }}/2 --reporter=dot,list
104+
105+
- name: Stop Flask server
106+
if: always()
107+
run: kill ${{ steps.start-server.outputs.pid }} 2>/dev/null || true
95108

96109
- name: Ensure required directories exist
97110
if: always()

0 commit comments

Comments
 (0)