Debian Codegraph @

.github/workflows/tests.yaml

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