]> git.ipfire.org Git - thirdparty/tornado.git/blob - .github/workflows/test.yml
bd9444423099da3e1aa6d153cc12366af6534ed7
[thirdparty/tornado.git] / .github / workflows / test.yml
1 # The "test" workflow is run on every PR and runs tests across all
2 # supported python versions and a range of configurations
3 # specified in tox.ini. Also see the "build" workflow which is only
4 # run for release branches and covers platforms other than linux-amd64
5 # (Platform-specific issues are rare these days so we don't want to
6 # take that time on every build).
7
8 name: Test
9
10 on: pull_request
11
12 jobs:
13 # Before starting the full build matrix, run one test configuration
14 # and the linter (the `black` linter is especially likely to catch
15 # first-time contributors).
16 test_quick:
17 name: Run quick tests
18 runs-on: ubuntu-22.04
19 steps:
20 - uses: actions/checkout@v3
21 - uses: actions/setup-python@v4
22 name: Install Python
23 with:
24 # Lint python version must be synced with tox.ini
25 python-version: '3.8'
26 - name: Install tox
27 run: python -m pip install tox -c requirements.txt
28
29 - name: Run test suite
30 run: python -m tox -e py38,lint
31
32 test_tox:
33 name: Run full tests
34 needs: test_quick
35 runs-on: ubuntu-22.04
36 strategy:
37 matrix:
38 include:
39 - python: '3.8'
40 tox_env: py38-full
41 - python: '3.9'
42 tox_env: py39-full
43 - python: '3.10'
44 tox_env: py310-full
45 - python: '3.10.8'
46 # Early versions of 3.10 and 3.11 had different deprecation
47 # warnings in asyncio. Test with them too to make sure everything
48 # works the same way.
49 tox_env: py310-full
50 - python: '3.11'
51 tox_env: py311-full
52 - python: '3.11.0'
53 tox_env: py311-full
54 - python: '3.12.0-beta.3 - 3.12'
55 tox_env: py312-full
56 - python: 'pypy-3.8'
57 # Pypy is a lot slower due to jit warmup costs, so don't run the
58 # "full" test config there.
59 tox_env: pypy3
60 - python: '3.8'
61 # Docs python version must be synced with tox.ini
62 tox_env: docs
63
64 steps:
65 - uses: actions/checkout@v3
66 - uses: actions/setup-python@v4
67 name: Install Python
68 with:
69 python-version: ${{ matrix.python}}
70 - name: Install apt packages
71 run: sudo apt-get update && sudo apt-get install libcurl4-openssl-dev
72 - name: Install tox
73 run: python -m pip install tox -c requirements.txt
74
75 - name: Run test suite
76 run: python -m tox -e ${{ matrix.tox_env }}
77