Debian Codegraph @

.github/workflows/tests.yaml

raw
1 name: Tests
2 on:
3 pull_request:
4 paths-ignore: ['docs/**', 'README.md']
5 push:
6 branches: [main, stable]
7 paths-ignore: ['docs/**', 'README.md']
8 permissions: {}
9 concurrency:
10 group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
11 cancel-in-progress: true
12 jobs:
13 tests:
14 name: ${{ matrix.name || matrix.python }}
15 runs-on: ${{ matrix.os || 'ubuntu-latest' }}
16 strategy:
17 fail-fast: false
18 matrix:
19 include:
20 - {python: '3.14'}
21 - {python: '3.14t'}
22 - {name: Windows, python: '3.14', os: windows-latest}
23 - {name: Mac, python: '3.14', os: macos-latest}
24 - {python: '3.13'}
25 - {python: '3.12'}
26 - {python: '3.11'}
27 - {python: '3.10'}
28 - {name: PyPy, python: 'pypy-3.11', tox: pypy3.11}
29 steps:
30 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
31 with:
32 persist-credentials: false
33 - uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
34 with:
35 enable-cache: true
36 prune-cache: false
37 - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
38 with:
39 python-version: ${{ matrix.python }}
40 - run: uv run --locked --no-default-groups --group dev tox run
41 env:
42 TOX_ENV: ${{ matrix.tox || format('py{0}', matrix.python) }}
43 typing:
44 runs-on: ubuntu-latest
45 steps:
46 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
47 with:
48 persist-credentials: false
49 - uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
50 with:
51 enable-cache: true
52 prune-cache: false
53 - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
54 with:
55 python-version-file: pyproject.toml
56 - name: cache mypy
57 uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
58 with:
59 path: ./.mypy_cache
60 key: mypy|${{ hashFiles('pyproject.toml') }}
61 - run: uv run --locked --no-default-groups --group dev tox run -e typing