-
-
Notifications
You must be signed in to change notification settings - Fork 95
65 lines (52 loc) · 1.87 KB
/
patchright_tests.yml
File metadata and controls
65 lines (52 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Patchright Chromium Tests
on:
workflow_dispatch:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
run-patchright-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Set up Python
run: |
uv python install
- name: Install Playwright-Python Package
run: |
uv sync --all-groups
git clone https://github.com/microsoft/playwright-python --branch $(curl --silent "https://api.github.com/repos/Kaliiiiiiiiii-Vinyzu/patchright-python/releases/latest" | grep '"tag_name"' | sed -E 's/.*"([^"]+)".*/\1/')
cd playwright-python
uv add -r local-requirements.txt
- name: Patch Playwright-Python Package
run: |
uv run patch_python_package.py
uvx ruff format playwright-python
- name: Build Patchright-Python Package
run: |
cd playwright-python
uv pip install -e .
for wheel in $(python setup.py --list-wheels); do
PLAYWRIGHT_TARGET_WHEEL=$wheel uv build --wheel
done
- name: Install Local Patchright Package
run: |
cd playwright-python
uv pip install dist/patchright-*-manylinux1_x86_64.whl
- name: Install Chromium with Patchright
run: |
uv run patchright install --with-deps chromium
- name: Clone Playwright-Python Tests
run: |
cp -r playwright-python/tests ./tests
- name: Modify Tests
run: |
uv run utils/modify_tests.py
- name: Run Chromium Tests
run: |
xvfb-run -a uv run pytest --browser=chromium --disable-warnings --timeout 90 tests/sync/
xvfb-run -a uv run pytest --browser=chromium --disable-warnings --timeout 90 tests/async/