Skip to content

Fix github action versions #496

Fix github action versions

Fix github action versions #496

Workflow file for this run

name: tests
on:
push:
branches: [main, test-me-*]
tags:
pull_request:
workflow_dispatch:
permissions:
contents: read
env:
# Force uv to install a managed interpreter rather than reusing the runner's
# preinstalled system Python. Without this there is nothing for
# `cache-python` to save and the cache step warns and no-ops.
UV_PYTHON_PREFERENCE: only-managed
jobs:
tests:
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
python: '3.10'
toxenv: py310
- os: ubuntu-latest
python: '3.11'
toxenv: py311
- os: ubuntu-latest
python: '3.12'
toxenv: py312
- os: ubuntu-latest
python: '3.13'
toxenv: py313
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
# Cache the interpreter download in addition to the package cache.
cache-python: true
# Sets UV_PYTHON, which takes precedence over .python-version. This
# keeps the tox driver environment on the same interpreter as the
# environment under test, so each job provisions only one Python.
python-version: ${{ matrix.python }}
- name: Run tox
run: uv run tox -e ${{ matrix.toxenv }}