1212
1313jobs :
1414 build :
15+ permissions :
16+ contents : read
17+ pull-requests : write
1518 strategy :
1619 # We want to see all failures:
1720 fail-fast : false
@@ -21,47 +24,39 @@ jobs:
2124 config :
2225 # [Python version, tox env]
2326 - ["3.11", "release-check"]
24- - ["3.8", "py38"]
2527 - ["3.9", "py39"]
2628 - ["3.10", "py310"]
2729 - ["3.11", "py311"]
2830 - ["3.12", "py312"]
2931 - ["3.13", "py313"]
30- - ["pypy-3.10 ", "pypy3"]
32+ - ["pypy-3.11 ", "pypy3"]
3133 - ["3.11", "coverage"]
3234
3335 runs-on : ${{ matrix.os[1] }}
3436 if : github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
3537 name : ${{ matrix.config[1] }}
3638 steps :
37- - uses : actions/checkout@v4
38- - name : Set up Python
39- uses : actions/setup-python@v5
39+ - uses : actions/checkout@v5
4040 with :
41- python-version : ${{ matrix.config[0] }}
42- allow-prereleases : true
43- - name : Pip cache
44- uses : actions/cache@v4
41+ persist-credentials : false
42+ - name : Install uv + caching
43+ uses : astral-sh/setup-uv@v6
4544 with :
46- path : ~/.cache/pip
47- key : ${{ runner.os }}-pip-${{ matrix.config[0] }}-${{ hashFiles('setup.*', 'tox.ini') }}
48- restore-keys : |
49- ${{ runner.os }}-pip-${{ matrix.config[0] }}-
50- ${{ runner.os }}-pip-
51- - name : Install dependencies
52- run : |
53- python -m pip install --upgrade pip
54- pip install tox
45+ enable-cache : true
46+ cache-dependency-glob : |
47+ setup.*
48+ tox.ini
49+ python-version : ${{ matrix.matrix.config[0] }}
50+ github-token : ${{ secrets.GITHUB_TOKEN }}
5551 - name : Test
5652 if : ${{ !startsWith(runner.os, 'Mac') }}
57- run : tox -e ${{ matrix.config[1] }}
53+ run : uvx --with tox-uv tox -e ${{ matrix.config[1] }}
5854 - name : Test (macOS)
5955 if : ${{ startsWith(runner.os, 'Mac') }}
60- run : tox -e ${{ matrix.config[1] }}-universal2
56+ run : uvx --with tox-uv tox -e ${{ matrix.config[1] }}-universal2
6157 - name : Coverage
6258 if : matrix.config[1] == 'coverage'
6359 run : |
64- pip install coveralls
65- coveralls --service=github
60+ uvx coveralls --service=github
6661 env :
6762 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments