|
12 | 12 |
|
13 | 13 | jobs:
|
14 | 14 | build:
|
| 15 | + permissions: |
| 16 | + contents: read |
| 17 | + pull-requests: write |
15 | 18 | strategy:
|
16 | 19 | # We want to see all failures:
|
17 | 20 | fail-fast: false
|
18 | 21 | matrix:
|
19 | 22 | os:
|
20 |
| - - ["ubuntu", "ubuntu-20.04"] |
| 23 | + - ["ubuntu", "ubuntu-latest"] |
21 | 24 | config:
|
22 | 25 | # [Python version, tox env]
|
23 |
| - - ["3.9", "lint"] |
24 |
| - - ["3.7", "py37"] |
25 |
| - - ["3.8", "py38"] |
26 |
| - - ["3.9", "py39"] |
27 |
| - - ["3.10", "py310"] |
28 |
| - - ["3.11", "py311"] |
29 |
| - - ["pypy-3.7", "pypy3"] |
30 |
| - - ["3.9", "coverage"] |
| 26 | + - ["3.11", "release-check"] |
| 27 | + - ["3.9", "py39"] |
| 28 | + - ["3.10", "py310"] |
| 29 | + - ["3.11", "py311"] |
| 30 | + - ["3.12", "py312"] |
| 31 | + - ["3.13", "py313"] |
| 32 | + - ["pypy-3.10", "pypy3"] |
| 33 | + - ["3.11", "coverage"] |
31 | 34 |
|
32 | 35 | runs-on: ${{ matrix.os[1] }}
|
33 | 36 | if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
|
34 | 37 | name: ${{ matrix.config[1] }}
|
35 | 38 | steps:
|
36 |
| - - uses: actions/checkout@v3 |
37 |
| - - name: Set up Python |
38 |
| - uses: actions/setup-python@v4 |
| 39 | + - uses: actions/checkout@v4 |
39 | 40 | with:
|
40 |
| - python-version: ${{ matrix.config[0] }} |
41 |
| - - name: Pip cache |
42 |
| - uses: actions/cache@v3 |
| 41 | + persist-credentials: false |
| 42 | + - name: Install uv + caching |
| 43 | + uses: astral-sh/setup-uv@v5 |
43 | 44 | with:
|
44 |
| - path: ~/.cache/pip |
45 |
| - key: ${{ runner.os }}-pip-${{ matrix.config[0] }}-${{ hashFiles('setup.*', 'tox.ini') }} |
46 |
| - restore-keys: | |
47 |
| - ${{ runner.os }}-pip-${{ matrix.config[0] }}- |
48 |
| - ${{ runner.os }}-pip- |
49 |
| - - name: Install dependencies |
50 |
| - run: | |
51 |
| - python -m pip install --upgrade pip |
52 |
| - 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 }} |
53 | 51 | - name: Test
|
54 |
| - run: tox -e ${{ matrix.config[1] }} |
| 52 | + if: ${{ !startsWith(runner.os, 'Mac') }} |
| 53 | + run: uvx --with tox-uv tox -e ${{ matrix.config[1] }} |
| 54 | + - name: Test (macOS) |
| 55 | + if: ${{ startsWith(runner.os, 'Mac') }} |
| 56 | + run: uvx --with tox-uv tox -e ${{ matrix.config[1] }}-universal2 |
55 | 57 | - name: Coverage
|
56 | 58 | if: matrix.config[1] == 'coverage'
|
57 | 59 | run: |
|
58 |
| - pip install coveralls coverage-python-version |
59 |
| - coveralls --service=github |
| 60 | + uvx coveralls --service=github |
60 | 61 | env:
|
61 | 62 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
0 commit comments