Debian Codegraph @

.github/workflows/tests.yaml

raw
1 name: Tests
2 on:
3 push:
4 branches:
5 - main
6 - '*.x'
7 paths-ignore:
8 - 'docs/**'
9 - '*.md'
10 - '*.rst'
11 pull_request:
12 paths-ignore:
13 - 'docs/**'
14 - '*.md'
15 - '*.rst'
16 jobs:
17 tests:
18 name: ${{ matrix.name || matrix.python }}
19 runs-on: ${{ matrix.os || 'ubuntu-latest' }}
20 strategy:
21 fail-fast: false
22 matrix:
23 include:
24 - {python: '3.12'}
25 - {name: Windows, python: '3.12', os: windows-latest}
26 - {name: Mac, python: '3.12', os: macos-latest}
27 - {python: '3.11'}
28 - {python: '3.10'}
29 - {python: '3.9'}
30 - {python: '3.8'}
31 - {name: PyPy, python: 'pypy-3.10', tox: pypy310}
32 steps:
33 - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
34 - uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
35 with:
36 python-version: ${{ matrix.python }}
37 allow-prereleases: true
38 cache: pip
39 cache-dependency-path: requirements*/*.txt
40 - run: pip install tox
41 - run: tox run -e ${{ matrix.tox || format('py{0}', matrix.python) }}
42 typing:
43 runs-on: ubuntu-latest
44 steps:
45 - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
46 - uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
47 with:
48 python-version: '3.x'
49 cache: pip
50 cache-dependency-path: requirements*/*.txt
51 - name: cache mypy
52 uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
53 with:
54 path: ./.mypy_cache
55 key: mypy|${{ hashFiles('pyproject.toml') }}
56 - run: pip install tox
57 - run: tox run -e typing