From 2bfcbeb9349b00da39b294b80eb313bdff6e549f Mon Sep 17 00:00:00 2001 From: Dmitry Gozman Date: Thu, 29 Oct 2026 14:36:42 +0000 Subject: [PATCH] devops(ci): run the Docker tests on the 64-core runners The hosted ubuntu-24.04 runners take about an hour per suite with two workers, and the amd64 jobs hit the 120 minute limit of the job. The 64-core runners of ci.yml, with its 16 workers, have room to spare; the arm64 one gets its first use. Not all of these runners have Docker: the setup step installs it when it is missing and moves the data to the large disk at /mnt, as the setup-docker action of microsoft/playwright-browsers does. Co-Authored-By: Claude Fable 5.1 --- .github/workflows/test_docker.yml | 32 ++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test_docker.yml b/.github/workflows/test_docker.yml index 14b45e1fb..ceafdda10 100644 --- a/.github/workflows/test_docker.yml +++ b/.github/workflows/test_docker.yml @@ -27,9 +27,14 @@ jobs: - jammy - noble - resolute - runs-on: - - ubuntu-24.04 - - ubuntu-24.04-arm + arch: + - amd64 + - arm64 + include: + - arch: amd64 + runs-on: playwright-x64-ubuntu24-64-core + - arch: arm64 + runs-on: playwright-arm64-ubuntu24-64-core steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Set up Python @@ -48,11 +53,20 @@ jobs: pip install -e . - name: Get Playwright run: python scripts/upstream.py checkout + - name: Set up Docker + run: | + if ! command -v docker >/dev/null 2>&1; then + curl -fsSL https://get.docker.com | sh + fi + sudo service docker stop + sudo mkdir -p /etc/docker /mnt/docker + echo '{ "data-root": "/mnt/docker" }' | sudo tee /etc/docker/daemon.json + sudo service docker start + # The docker group of a fresh install applies at the next login only. + sudo chmod 666 /var/run/docker.sock # build.sh builds the wheels, and with them the driver. - name: Build Docker image - run: | - ARCH="${{ matrix.runs-on == 'ubuntu-24.04-arm' && 'arm64' || 'amd64' }}" - bash utils/docker/build.sh --$ARCH ${{ matrix.docker-image-variant }} playwright-python:localbuild-${{ matrix.docker-image-variant }} + run: bash utils/docker/build.sh --${{ matrix.arch }} ${{ matrix.docker-image-variant }} playwright-python:localbuild-${{ matrix.docker-image-variant }} - name: Start the container id: container run: | @@ -67,10 +81,10 @@ jobs: # Node.js in the image. docker exec playwright-docker-test python -m build --wheel # As in ci.yml: the dot reporter (scripts/pytest_dot_reporter.py, found through - # PYTHONPATH), and two workers, upstream's default of half the cores of these runners. + # PYTHONPATH), and 16 workers. - name: Test Sync API - run: docker exec playwright-docker-test xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" pytest tests/sync -n 2 -p pytest_dot_reporter -rfE --color=yes + run: docker exec playwright-docker-test xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" pytest tests/sync -n 16 -p pytest_dot_reporter -rfE --color=yes - name: Test Async API # Also after a failed sync step: the two suites report on their own. if: ${{ !cancelled() && steps.container.outcome == 'success' }} - run: docker exec playwright-docker-test xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" pytest tests/async -n 2 -p pytest_dot_reporter -rfE --color=yes + run: docker exec playwright-docker-test xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" pytest tests/async -n 16 -p pytest_dot_reporter -rfE --color=yes