Debian Codegraph @

.github/workflows/tests.yml

raw
1 name: Run tests
2
3 on:
4 push:
5 branches:
6 - main
7 pull_request:
8 branches:
9 - main
10
11 env:
12 WEBSOCKETS_TESTS_TIMEOUT_FACTOR: 20
13
14 jobs:
15 coverage:
16 name: Run test coverage checks
17 runs-on: ubuntu-latest
18 steps:
19 - name: Check out repository
20 uses: actions/checkout@v7
21 - name: Install Python 3.x
22 uses: actions/setup-python@v7
23 with:
24 python-version: "3.x"
25 - name: Install tox
26 run: pip install tox
27 - name: Run tests with coverage
28 run: tox -e coverage
29 - name: Run tests with per-module coverage
30 run: tox -e maxi_cov
31 timeout-minutes: 3
32
33 quality:
34 name: Run code quality checks
35 runs-on: ubuntu-latest
36 steps:
37 - name: Check out repository
38 uses: actions/checkout@v7
39 - name: Install Python 3.x
40 uses: actions/setup-python@v7
41 with:
42 python-version: "3.x"
43 - name: Install tox
44 run: pip install tox
45 - name: Check code formatting & style
46 run: tox -e ruff
47 - name: Check types statically
48 run: tox -e mypy
49 timeout-minutes: 1
50
51 matrix:
52 name: Run tests on Python ${{ matrix.python }}
53 needs:
54 - coverage
55 - quality
56 runs-on: ubuntu-latest
57 strategy:
58 matrix:
59 python:
60 - "3.11"
61 - "3.12"
62 - "3.13"
63 - "3.14"
64 - "3.15"
65 - "3.15t"
66 - "pypy-3.11"
67 is_main:
68 - ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
69 exclude:
70 - python: "pypy-3.11"
71 is_main: false
72 steps:
73 - name: Check out repository
74 uses: actions/checkout@v7
75 - name: Install Python ${{ matrix.python }}
76 uses: actions/setup-python@v7
77 with:
78 python-version: ${{ matrix.python }}
79 allow-prereleases: true
80 - name: Install tox
81 run: pip install tox
82 - name: Run tests
83 run: tox -e py
84 timeout-minutes: 2