Skip to content

Commit 12a6fce

Browse files
committed
CI: set up Python and timeout wait for service
1 parent f3ba0c9 commit 12a6fce

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

.github/workflows/local-playground-test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ jobs:
1818
uses: actions/setup-node@v4
1919
with:
2020
node-version: 18.x
21+
- uses: actions/setup-python@v5
22+
with:
23+
python-version: '3.13'
24+
cache: 'pip'
2125
- name: Run Cypress tests on local Playground
2226
run: |
2327
cd mkdocs/docs/playground

mkdocs/docs/playground/run-cypress-local.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,14 @@ wait_for_service() {
66
SERVICE="$1"
77
PORT="$2"
88
echo "Waiting for $SERVICE at port $PORT..."
9+
i=0
910
while ! nc -z localhost "$PORT"; do
1011
sleep 0.1s
12+
i=$((i + 1))
13+
if [[ "$i" -gt 100 ]]; then
14+
echo "Timed out after waiting 10s"
15+
exit 1
16+
fi
1117
done
1218
}
1319

0 commit comments

Comments
 (0)