Remove Hyperbrowser sponsorship #31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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/ |