forked from falconry/falcon
-
Notifications
You must be signed in to change notification settings - Fork 0
162 lines (152 loc) · 4.8 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
name: Run 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.toxenv }} (${{matrix.python-version}} on ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version:
- "3.12"
python-dev-version:
- ""
os:
- "ubuntu-latest"
toxenv:
- "pep8"
- "pep8-docstrings"
- "pep8-examples"
- "ruff"
- "mypy"
- "mypy_tests"
- "py312"
- "py312_sans_msgpack"
- "py312_cython"
- "docs"
- "towncrier"
- "look"
- "asgilook"
- "ws_tutorial"
# NOTE(vytas): Temporarily disabled while we are releasing a
# new version of python-mimeparse, and haven't decided yet whether
# to keep vendoring or reimplement.
# - "check_vendored"
- "twine_check"
- "daphne"
- "hypercorn"
- "e2e_chrome"
- "e2e_firefox"
- "no_optional_packages"
# TODO(kgriffs): Re-enable once hug has a chance to address
# breaking changes in Falcon 3.0
# - "hug"
include:
- python-version: pypy3.9
os: ubuntu-latest
toxenv: pypy3
- python-version: "3.8"
os: ubuntu-latest
toxenv: py38
- python-version: "3.9"
os: ubuntu-latest
toxenv: py39
- python-version: "3.9"
os: ubuntu-latest
toxenv: py39_cython
- python-version: "3.10"
os: ubuntu-latest
toxenv: py310
- python-version: "3.10"
os: ubuntu-latest
toxenv: py310_cython
- python-version: "3.11"
os: ubuntu-latest
toxenv: py311
- python-version: "3.11"
os: ubuntu-latest
toxenv: py311_cython
- python-version: "3.12"
os: ubuntu-latest
toxenv: py312
- python-version: "3.12"
os: ubuntu-latest
toxenv: py312_cython
- python-version: "3.12"
os: macos-latest
toxenv: py312_nocover
- python-version: "3.12"
os: windows-latest
toxenv: py312_nocover
- python-version: "3.13"
python-dev-version: "3.13.0-rc.1 - 3.13"
os: ubuntu-latest
toxenv: py313
- python-version: "3.13"
python-dev-version: "3.13.0-rc.1 - 3.13"
os: ubuntu-latest
toxenv: py313_cython
# These env require 3.8 and 20.04, see tox.ini
- python-version: "3.8"
os: ubuntu-20.04
toxenv: py38_smoke
- python-version: "3.8"
os: ubuntu-20.04
toxenv: py38_smoke_cython
- python-version: "3.8"
os: ubuntu-latest
toxenv: "wsgi_servers"
# Steps to run in each job.
# Some are GitHub actions, others run shell commands.
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
if: ${{ !matrix.python-dev-version }}
with:
python-version: ${{ matrix.python-version }}
- name: Set up Python (pre-release)
uses: actions/setup-python@v5
if: ${{ matrix.python-dev-version }}
with:
python-version: ${{ matrix.python-dev-version }}
- name: Install smoke test dependencies
if: ${{ matrix.toxenv == 'py38_smoke' || matrix.toxenv == 'py38_smoke_cython' }}
run: |
sudo apt-get update
sudo apt-get install -y libunwind-dev
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U coverage fixtures setuptools tox wheel
python --version
pip --version
tox --version
coverage --version
- name: Run tests
run: tox -e ${{ matrix.toxenv }}
- name: Combine coverage
if: ${{ matrix.toxenv == 'py312' || matrix.toxenv == 'py312_sans_msgpack' }}
run: |
coverage --version
coverage combine
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
if: ${{ matrix.toxenv == 'py312' || matrix.toxenv == 'py312_sans_msgpack' }}
with:
env_vars: PYTHON
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}