Skip to content

Commit 99fa5e1

Browse files
feat: add Playwright Python and Chromium
e2e-tests needs in-cluster Chromium. Browsers live at /ms-playwright so ARC's 2 GiB emptyDir on /home/runner/.cache cannot mask them. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent a7d8706 commit 99fa5e1

4 files changed

Lines changed: 24 additions & 0 deletions

File tree

‎Containerfile‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,20 @@ RUN pip3 install --no-cache-dir --break-system-packages pre-commit \
233233
&& python3.13 -m pip install --no-cache-dir --break-system-packages --upgrade \
234234
"setuptools>=78.1.1" "msgpack>=1.2.1"
235235

236+
# Playwright + Chromium for in-cluster e2e (Laelidona/e2e-tests).
237+
# Browsers MUST live at /ms-playwright — ARC lite mounts a 2 GiB memory emptyDir
238+
# on /home/runner/.cache, which would mask ~/.cache/ms-playwright.
239+
ARG PLAYWRIGHT_VERSION=1.62.0
240+
ENV PLAYWRIGHT_VERSION=${PLAYWRIGHT_VERSION} \
241+
PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
242+
# hadolint ignore=DL3008,DL3013
243+
RUN python3.12 -m pip install --no-cache-dir --break-system-packages \
244+
"playwright==${PLAYWRIGHT_VERSION}" \
245+
&& python3.12 -m playwright install --with-deps chromium \
246+
&& chmod -R a+rX "${PLAYWRIGHT_BROWSERS_PATH}" \
247+
&& apt-get clean \
248+
&& rm -rf /var/lib/apt/lists/*
249+
236250
# Base stage must not end as root (hadolint DL3002)
237251
USER runner
238252

‎README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Container image based on the [GitHub Actions Runner](https://github.com/actions/
1515
| Python | 3.12, 3.13 (via deadsnakes PPA) |
1616
| Poetry | latest |
1717
| UV | latest |
18+
| Playwright (Python) + Chromium | `PLAYWRIGHT_VERSION` (browsers at `/ms-playwright`) |
1819

1920
### DevOps CLIs
2021

‎manifest.yaml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ build:
2828
- RUST_VERSION=1.97.1
2929
- ZIG_VERSION=0.14.0
3030
- CARGO_LAMBDA_VERSION=1.9.1
31+
- PLAYWRIGHT_VERSION=1.62.0
3132
labels:
3233
- org.opencontainers.image.source=https://github.com/deerhide/python-github-runner
3334
- org.opencontainers.image.description="Python GitHub Runner"

‎renovate.json‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,14 @@
157157
"depNameTemplate": "cargo-lambda/cargo-lambda",
158158
"datasourceTemplate": "github-releases",
159159
"extractVersionTemplate": "^v?(?<version>.+)$"
160+
},
161+
{
162+
"customType": "regex",
163+
"description": "Update Playwright (Python) version",
164+
"fileMatch": ["^Containerfile$", "^manifest\\.yaml$"],
165+
"matchStrings": ["PLAYWRIGHT_VERSION=(?<currentValue>\\S+)"],
166+
"depNameTemplate": "playwright",
167+
"datasourceTemplate": "pypi"
160168
}
161169
]
162170
}

0 commit comments

Comments
 (0)