-
Notifications
You must be signed in to change notification settings - Fork 24
252 lines (248 loc) · 7.07 KB
/
ci.yml
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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
name: CI
on:
push:
branches:
- main
tags:
- v*
pull_request:
branches:
- "*"
schedule:
# Daily at 05:47
- cron: '47 5 * * *'
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && github.sha || '' }}
cancel-in-progress: true
env:
PIP_NO_PYTHON_VERSION_WARNING: 1
jobs:
test:
name: ${{ matrix.os.name }} ${{ matrix.python.name }} ${{ matrix.reactor.name }}
runs-on: ${{ matrix.os.runs-on }}
container: ${{ matrix.os.container[matrix.python.docker] }}
strategy:
fail-fast: false
matrix:
os:
- name: 🐧
runs-on: ubuntu-latest
python_platform: linux
container:
"2.7": docker://python:2.7-buster
"3.5": docker://python:3.5-buster
"3.6": docker://python:3.6-buster
"3.7": docker://python:3.7-buster
"3.8": docker://python:3.8-buster
"3.9": docker://python:3.9-buster
"3.10": docker://python:3.10-buster
"3.11": docker://python:3.11-buster
"pypy2.7": docker://pypy:2.7-buster
"pypy3.7": docker://pypy:3.7-buster
"pypy3.8": docker://pypy:3.8-buster
"pypy3.9": docker://pypy:3.9-buster
- name: 🪟
runs-on: windows-latest
python_platform: win32
- name: 🍎
runs-on: macos-latest
python_platform: darwin
python:
- name: CPython 2.7
tox: py27
action: 2.7
docker: 2.7
implementation: cpython
major: 2
- name: CPython 3.5
tox: py35
action: 3.5
docker: 3.5
implementation: cpython
major: 3
- name: CPython 3.6
tox: py36
action: 3.6
docker: 3.6
implementation: cpython
major: 3
- name: CPython 3.7
tox: py37
action: 3.7
docker: 3.7
implementation: cpython
major: 3
- name: CPython 3.8
tox: py38
action: 3.8
docker: 3.8
implementation: cpython
major: 3
- name: CPython 3.9
tox: py39
action: 3.9
docker: 3.9
implementation: cpython
major: 3
- name: CPython 3.10
tox: py310
action: "3.10"
docker: "3.10"
implementation: cpython
major: 3
- name: CPython 3.11
tox: py311
action: "3.11"
docker: "3.11"
implementation: cpython
major: 3
# disabled due to installation failures
# https://github.com/pytest-dev/pytest-twisted/pull/157
# - name: PyPy 2.7
# tox: pypy27
# action: pypy-2.7
# docker: pypy2.7
# implementation: pypy
# major: 2
- name: PyPy 3.7
tox: pypy37
action: pypy-3.7
docker: pypy3.7
implementation: pypy
major: 3
- name: PyPy 3.8
tox: pypy38
action: pypy-3.8
docker: pypy3.8
implementation: pypy
major: 3
- name: PyPy 3.9
tox: pypy39
action: pypy-3.9
docker: pypy3.9
implementation: pypy
major: 3
reactor:
- name: default
tox: default
dependencies: default
- name: PyQt5
tox: pyqt5
dependencies: qt5
- name: PySide2
tox: pyside2
dependencies: qt5
- name: asyncio
tox: asyncio
dependencies: asyncio
exclude:
- python:
major: 2
os:
python_platform: darwin
- python:
major: 2
os:
python_platform: win32
- python:
major: 2
reactor:
tox: pyqt5
- python:
major: 2
reactor:
tox: pyside2
- python:
action: "3.11"
reactor:
tox: pyside2
- python:
major: 2
reactor:
tox: asyncio
- python:
implementation: pypy
reactor:
tox: pyqt5
- python:
implementation: pypy
reactor:
tox: pyside2
steps:
- uses: actions/checkout@v2
- name: Enable Problem Matchers
run: |
echo "::add-matcher::.github/local-problem-matchers.json"
- name: Set up ${{ matrix.python.name }}
if: ${{ job.container == '' }}
uses: actions/setup-python@v2
with:
# This allows the matrix to specify just the major.minor version while still
# expanding it to get the latest patch version including alpha releases.
# This avoids the need to update for each new alpha, beta, release candidate,
# and then finally an actual release version. actions/setup-python doesn't
# support this for PyPy presently so we get no help there.
#
# CPython -> 3.9.0-alpha - 3.9.X
# PyPy -> pypy-3.7
python-version: ${{ fromJSON(format('["{0}", "{1}"]', format('{0}.0-alpha - {0}.X', matrix.python.action), matrix.python.action))[startsWith(matrix.python.action, 'pypy')] }}
architecture: x64
- name: Report Python information
shell: bash
run: |
python -c 'import sys; print(sys.version)'
echo
echo " <=======>"
echo
pip --version
echo
echo " <=======>"
echo
pip list
echo
echo " <=======>"
echo
pip freeze --all
- name: Install Linux Qt5 dependencies
if: matrix.os.python_platform == 'linux' && matrix.reactor.dependencies == 'qt5'
run: |
apt-get update --yes
apt-get install --yes libgl1
- name: Install
run: |
pip install tox
- name: Test
run: |
tox -v -e "${{ matrix.python.tox }}-${{ matrix.reactor.tox }}reactor"
linting:
name: Linting
runs-on: ubuntu-latest
strategy:
matrix:
python:
- short: 39
dotted: 3.9
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python.dotted }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python.dotted }}
architecture: x64
- name: Install
run: |
pip install tox
- name: Test
run: |
tox -v -e linting
all:
name: All
runs-on: ubuntu-latest
needs:
- test
- linting
steps:
- name: This
shell: python
run: |
import this