Skip to content

chore: support Python 3.13 #581

chore: support Python 3.13

chore: support Python 3.13 #581

Workflow file for this run

name: Test Docker
on:
push:
paths:
- '.github/workflows/test_docker.yml'
- 'setup.py'
- '**/Dockerfile.*'
branches:
- main
- release-*
pull_request:
paths:
- '.github/workflows/test_docker.yml'
- 'setup.py'
- '**/Dockerfile.*'
branches:
- main
- release-*
jobs:
build:
timeout-minutes: 120
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
docker-image-variant:
- focal
- jammy
- noble
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r local-requirements.txt
pip install -e .
- name: Build Docker image
run: bash utils/docker/build.sh --amd64 ${{ matrix.docker-image-variant }} playwright-python:localbuild-${{ matrix.docker-image-variant }}
- name: Test
run: |
CONTAINER_ID="$(docker run --rm -v $(pwd):/root/playwright --name playwright-docker-test --workdir /root/playwright/ -d -t playwright-python:localbuild-${{ matrix.docker-image-variant }} /bin/bash)"
# Fix permissions for Git inside the container
docker exec "${CONTAINER_ID}" chown -R root:root /root/playwright
docker exec "${CONTAINER_ID}" pip install -r local-requirements.txt
docker exec "${CONTAINER_ID}" pip install -e .
docker exec "${CONTAINER_ID}" python setup.py bdist_wheel
docker exec "${CONTAINER_ID}" xvfb-run pytest -vv tests/sync/
docker exec "${CONTAINER_ID}" xvfb-run pytest -vv tests/async/