From 91c06dcb8f0019c99112819cf7fbacc05def6b98 Mon Sep 17 00:00:00 2001 From: elParaguayo Date: Sat, 20 Jul 2024 16:40:25 +0100 Subject: [PATCH] Add python 3.13 to CI Adding pre-release versions of python lets us identify issues in advance. --- .github/workflows/future_python.yml | 48 +++++++++++++++++++++++++++++ tox.ini | 9 +++--- 2 files changed, 53 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/future_python.yml diff --git a/.github/workflows/future_python.yml b/.github/workflows/future_python.yml new file mode 100644 index 0000000000..d0def88a93 --- /dev/null +++ b/.github/workflows/future_python.yml @@ -0,0 +1,48 @@ +name: Test pre-release versions of python + +on: + push: + pull_request: + +jobs: + build: + runs-on: ubuntu-24.04 + name: "python ${{ matrix.python-version }} on ${{ matrix.backend }}" + continue-on-error: true + strategy: + matrix: + # If you change one of these, be sure to update: + # - /tox.ini:[gh-actions] + # - /setup.cfg:[mypy] + # If adding new python versions, consider also updating + # python version in .readthedocs.yaml + # TODO: Add back pypy here and in release.yml once: + # https://github.com/pypy/pypy/issues/4956 is resolved + python-version: ['3.13'] + backend: ['x11', 'wayland'] + steps: + - uses: actions/checkout@v4 + - name: Set up python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + allow-prereleases: true + - name: Install dependencies + run: | + sudo apt update + # Any Wayland-specific Ubuntu system dependencies should be installed from ./scripts/ubuntu_wayland_setup + sudo apt install --no-install-recommends \ + libdbus-1-dev libgirepository1.0-dev gir1.2-gtk-3.0 gir1.2-notify-0.7 gir1.2-gudev-1.0 graphviz \ + imagemagick git xserver-xephyr xterm xvfb dbus-x11 libnotify-bin \ + libxcb-composite0-dev libxcb-icccm4-dev libxcb-res0-dev libxcb-render0-dev libxcb-res0-dev \ + libxcb-xfixes0-dev vlc volumeicon-alsa libxkbcommon-dev python-gi-dev tox libcairo2-dev + pip -q install --break-system-packages tox-gh-actions + - name: Install wayland + if: ${{ matrix.backend == 'wayland' }} + run: bash -x ./scripts/ubuntu_wayland_setup + - name: Run Tests + run: | + [ "$(grep -c -P '\t' CHANGELOG)" = "0" ] + tox + env: + BACKEND: ${{ matrix.backend }} diff --git a/tox.ini b/tox.ini index 8086520eff..8a2ddfd1a0 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ skipsdist=True minversion = 4.0.12 envlist = # Python environments with specific backend - py{py3,310,311,312}-{x11,wayland} + py{py3,310,311,312,313}-{x11,wayland} docs, packaging-{x11,wayland}, # For running pytest locally @@ -35,7 +35,7 @@ commands = !x11: {toxinidir}/scripts/ffibuild # These are the environments that should be triggered by Github Actions -[testenv:py{py3,310,311,312}-{wayland,x11}] +[testenv:py{py3,310,311,312,313}-{wayland,x11}] # This is required in order to get UTF-8 output inside of the subprocesses # that our tests use. setenv = LC_CTYPE = en_US.UTF-8 @@ -54,8 +54,8 @@ commands = # pypy3 is very slow when running coverage reports so we skip it pypy3-x11: python3 -m pytest --backend=x11 {posargs} pypy3-wayland: python3 -m pytest --backend=wayland {posargs} - py3{10,11,12}-x11: coverage run -m pytest --backend=x11 {posargs} - py3{10,11,12}-wayland: coverage run -m pytest --backend=wayland {posargs} + py3{10,11,12,13}-x11: coverage run -m pytest --backend=x11 {posargs} + py3{10,11,12,13}-wayland: coverage run -m pytest --backend=wayland {posargs} # Coverage is only run via GithubActions # Coverage runs tests in parallel so we need to combine results into a single file @@ -125,6 +125,7 @@ python = 3.10: py310 3.11: py311 3.12: py312, packaging + 3.13: py313 [gh-actions:env] BACKEND =