-
Notifications
You must be signed in to change notification settings - Fork 3
57 lines (49 loc) · 1.43 KB
/
Copy pathtests.yml
File metadata and controls
57 lines (49 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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 }}