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 - {python: '3.11'}
26 - {python: '3.10'}
27 - {python: '3.9'}
28 - {python: '3.8'}
29 - {name: Minimal, python: '3.12', tox: minimal}
30 steps:
31 - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
32 - uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
33 with:
34 python-version: ${{ matrix.python }}
35 allow-prereleases: true
36 cache: pip
37 cache-dependency-path: requirements*/*.txt
38 - run: pip install tox
39 - run: tox run -e ${{ matrix.tox || format('py{0}', matrix.python) }}
40 typing:
41 runs-on: ubuntu-latest
42 steps:
43 - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
44 - uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
45 with:
46 python-version: '3.x'
47 cache: pip
48 cache-dependency-path: requirements*/*.txt
49 - name: cache mypy
50 uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
51 with:
52 path: ./.mypy_cache
53 key: mypy|${{ hashFiles('pyproject.toml') }}
54 - run: pip install tox
55 - run: tox run -e typing