CI: run the UI screenshot job in the Node-based Playwright image
CI / Lint (flake8, house style) (pull_request) Successful in 1m26s
CI / Test (pytest) (pull_request) Successful in 1m28s
CI / Scan (secrets, workflows, shell, patterns) (pull_request) Successful in 1m31s
CI / Integration (MariaDB) (pull_request) Successful in 2m1s
CI / UI (screenshots) (pull_request) Successful in 3m2s
CI / Security (bandit, pip-audit) (pull_request) Successful in 1m13s
CI / Deploy (pull_request) Skipped
CI / Lint (flake8, house style) (pull_request) Successful in 1m26s
CI / Test (pytest) (pull_request) Successful in 1m28s
CI / Scan (secrets, workflows, shell, patterns) (pull_request) Successful in 1m31s
CI / Integration (MariaDB) (pull_request) Successful in 2m1s
CI / UI (screenshots) (pull_request) Successful in 3m2s
CI / Security (bandit, pip-audit) (pull_request) Successful in 1m13s
CI / Deploy (pull_request) Skipped
actions/checkout needs Node, which the Python-only image lacks. Use mcr.microsoft.com/playwright (same browser build as the pip pin) and add Python in a venv; wait for the demo server with Python instead of curl. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ab4b20d15f
commit
2f7623840c
1 file changed
+15
-7
+15
-7
@@ -140,19 +140,27 @@ jobs:
|
||||
name: UI (screenshots)
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
# Chromium and its system libraries; the version must match the playwright pip pin.
|
||||
container: mcr.microsoft.com/playwright/python:v1.49.1-noble@sha256:42e251ec3238672c931be6c3565ff279690ae072c3e22058128d0412494f6866
|
||||
# Node (for the checkout action), Chromium and its system libraries. The browser build must
|
||||
# match the playwright pip pin below; Python is added in the first step.
|
||||
container: mcr.microsoft.com/playwright:v1.49.1-noble@sha256:70e367e0cbf60340a5b5fd562f6247a34eb3196efab9f88a3dd56482d9fe09d2
|
||||
steps:
|
||||
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Python dependencies
|
||||
run: python3 -m pip install --quiet --break-system-packages -r requirements.txt playwright==1.49.1
|
||||
- name: Python and dependencies
|
||||
run: |
|
||||
apt-get update -qq
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends python3 python3-venv >/dev/null
|
||||
python3 -m venv /tmp/venv
|
||||
/tmp/venv/bin/pip install --quiet --disable-pip-version-check -r requirements.txt playwright==1.49.1
|
||||
- name: Every page renders with replay data (desktop and mobile, dark and light)
|
||||
run: |
|
||||
python3 scripts/ui_demo.py 8811 > /tmp/ui-demo.log 2>&1 &
|
||||
for _ in $(seq 1 60); do curl -fs -o /dev/null http://127.0.0.1:8811/ && break; sleep 1; done
|
||||
python3 scripts/screenshots.py http://127.0.0.1:8811 ui-screenshots
|
||||
/tmp/venv/bin/python scripts/ui_demo.py 8811 > /tmp/ui-demo.log 2>&1 &
|
||||
for _ in $(seq 1 60); do
|
||||
/tmp/venv/bin/python -c 'import urllib.request; urllib.request.urlopen("http://127.0.0.1:8811/", timeout=2)' 2>/dev/null && break
|
||||
sleep 1
|
||||
done
|
||||
/tmp/venv/bin/python scripts/screenshots.py http://127.0.0.1:8811 ui-screenshots
|
||||
- name: Demo server log
|
||||
if: always()
|
||||
run: tail -n 100 /tmp/ui-demo.log || true
|
||||
|
||||
Reference in new issue
Block a user