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
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"]
@@ -34,33 +36,26 @@ jobs:
3436 name : ${{ matrix.config[1] }}
3537 steps :
3638 - uses : actions/checkout@v4
37- - name : Set up Python
38- uses : actions/setup-python@v5
3939 with :
40- python-version : ${{ matrix.config[0] }}
41- allow-prereleases : true
42- - name : Pip cache
43- uses : actions/cache@v4
40+ persist-credentials : false
41+ - name : Install uv + caching
42+ uses : astral-sh/setup-uv@v5
4443 with :
45- path : ~/.cache/pip
46- key : ${{ runner.os }}-pip-${{ matrix.config[0] }}-${{ hashFiles('setup.*', 'tox.ini') }}
47- restore-keys : |
48- ${{ runner.os }}-pip-${{ matrix.config[0] }}-
49- ${{ runner.os }}-pip-
50- - name : Install dependencies
51- run : |
52- python -m pip install --upgrade pip
53- pip install tox
44+ enable-cache : true
45+ cache-dependency-glob : |
46+ setup.*
47+ tox.ini
48+ python-version : ${{ matrix.matrix.config[0] }}
49+ github-token : ${{ secrets.GITHUB_TOKEN }}
5450 - name : Test
5551 if : ${{ !startsWith(runner.os, 'Mac') }}
56- run : tox -e ${{ matrix.config[1] }}
52+ run : uvx --with tox-uv tox -e ${{ matrix.config[1] }}
5753 - name : Test (macOS)
5854 if : ${{ startsWith(runner.os, 'Mac') }}
59- run : tox -e ${{ matrix.config[1] }}-universal2
55+ run : uvx --with tox-uv tox -e ${{ matrix.config[1] }}-universal2
6056 - name : Coverage
6157 if : matrix.config[1] == 'coverage'
6258 run : |
63- pip install coveralls
64- coveralls --service=github
59+ uvx coveralls --service=github
6560 env :
6661 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments