-
-
Notifications
You must be signed in to change notification settings - Fork 947
122 lines (114 loc) · 3.32 KB
/
tests.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# Run tests in various tox environments.
name: tests
on:
# NOTE(vytas): Trigger the tests workflow on push or pull request
# (pull requests only for the master branch for now).
push:
branches:
- "*"
pull_request:
branches:
- master
jobs:
run-tox:
name: tox -e ${{ matrix.tox.env }}${{ matrix.tox.platform-label || '' }}
runs-on: ${{ matrix.tox.os || matrix.default-os }}
strategy:
fail-fast: false
matrix:
default-os:
- "ubuntu-latest"
python-version:
- "3.12"
tox:
# Lint
- env: pep8
- env: pep8-docstrings
- env: ruff
# Documentation
- env: docs
- env: towncrier
# Typing
- env: mypy
- env: pyright
- env: mypy_tests
# Python tests
- env: mintest
coverage: true
- env: pypy3
python-version: "pypy3.10"
- env: py38
python-version: "3.8"
- env: py39
python-version: "3.9"
- env: py310
python-version: "3.10"
- env: py310_cython
python-version: "3.10"
- env: py311
python-version: "3.11"
- env: py311_cython
python-version: "3.11"
- env: py312
coverage: true
python-version: "3.12"
- env: py312_cython
python-version: "3.12"
- env: py313
python-version: "3.13"
- env: py313_cython
python-version: "3.13"
- env: py312_nocover
os: macos-latest
platform-label: ' (macos)'
- env: py312_nocover
os: windows-latest
platform-label: ' (windows)'
# Tutorials
- env: "look"
- env: "asgilook"
- env: "ws_tutorial"
# Tooling
- env: "twine_check"
# ASGI & WSGI servers
- env: "daphne"
- env: "hypercorn"
- env: "wsgi_servers"
# E2E tests
- env: "e2e_chrome"
# TODO(vytas): Something is not working correctly with the
# newly released Firefox 131.0, SeleniumBase, and our tests.
# - env: "e2e_firefox"
steps:
- name: Checkout repo
uses: actions/checkout@v4
# NOTE(vytas): Work around
# https://github.com/codecov/codecov-action/issues/190
with:
fetch-depth: 2
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.tox.python-version || matrix.python-version }}
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade coverage setuptools tox wheel
python --version
pip --version
tox --version
coverage --version
- name: Run tox
run: tox -e ${{ matrix.tox.env }}
- name: Combine coverage
if: ${{ matrix.tox.coverage }}
run: |
coverage --version
coverage combine
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
if: ${{ matrix.tox.coverage }}
with:
env_vars: PYTHON
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}