-
-
Notifications
You must be signed in to change notification settings - Fork 946
140 lines (131 loc) · 3.96 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
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.10"
os:
- "ubuntu-latest"
toxenv:
- "pep8"
- "blue"
- "pep8-examples"
- "pep8-docstrings"
- "mypy"
- "mypy_tests"
- "py310"
- "py310_sans_msgpack"
- "py310_cython"
- "docs"
- "towncrier"
- "look"
- "asgilook"
- "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.7"
os: ubuntu-latest
toxenv: py37
- python-version: "3.8"
os: ubuntu-latest
toxenv: py38
- python-version: "3.8"
os: ubuntu-latest
toxenv: py38_cython
- 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.10"
os: macos-latest
toxenv: py310_nocover
- python-version: "3.10"
os: windows-latest
toxenv: py310_nocover
# 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@v3
# NOTE(vytas): Work around
# https://github.com/codecov/codecov-action/issues/190
with:
fetch-depth: 2
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-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 == 'py310' || matrix.toxenv == 'py310_sans_msgpack' }}
run: |
coverage --version
coverage combine
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
if: ${{ matrix.toxenv == 'py310' || matrix.toxenv == 'py310_sans_msgpack' }}
with:
env_vars: PYTHON
fail_ci_if_error: true