-
Notifications
You must be signed in to change notification settings - Fork 2.7k
321 lines (307 loc) · 11.9 KB
/
Copy pathintegration.yaml
File metadata and controls
321 lines (307 loc) · 11.9 KB
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
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
name: CI
on:
push:
paths-ignore:
- 'docs/**'
- '**/*.rst'
- '**/*.md'
branches:
- master
- '[0-9].[0-9]'
pull_request:
branches:
- master
- '[0-9].[0-9]'
schedule:
- cron: '0 1 * * *' # nightly build
concurrency:
group: ${{ github.event.pull_request.number || github.ref }}-integration
cancel-in-progress: true
permissions:
contents: read # to fetch code (actions/checkout)
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
# this speeds up coverage with Python 3.12: https://github.com/nedbat/coveragepy/issues/1665
COVERAGE_CORE: sysmon
# patch releases get included in the base version image when they are published
# for example after 8.2.1 is published, 8.2 image contains 8.2.1 content
CURRENT_REDIS_VERSION: '8.8.0'
REDIS_VERSION_CUSTOM_MAP: >-
8.10:custom-29557896054-debian
jobs:
dependency-audit:
name: Dependency audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: pypa/gh-action-pip-audit@v1.0.8
with:
inputs: dev_requirements.txt
ignore-vulns: |
GHSA-w596-4wvx-j9j6 # subversion related git pull, dependency for pytest. There is no impact here.
CVE-2026-34073 # DNS name constraints were validated only against SANs, not against the peer name used in verification
# Update version when msal dependency in entraid is updated
CVE-2026-4539 # pygments ReDoS in AdlLexer, local access only, no fix available yet
lint:
name: Code linters
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v6
with:
python-version: "3.10"
cache: 'pip'
- name: run code linters
run: |
pip install -r dev_requirements.txt
pip uninstall -y redis # uninstall Redis package installed via redis-entraid
invoke linters
redis_version:
runs-on: ubuntu-latest
outputs:
CURRENT: ${{ env.CURRENT_REDIS_VERSION }}
steps:
- name: Compute outputs
run: |
echo "CURRENT=${{ env.CURRENT_REDIS_VERSION }}" >> $GITHUB_OUTPUT
tests:
runs-on: ubuntu-latest
timeout-minutes: 60
needs: redis_version
strategy:
max-parallel: 30
fail-fast: false
matrix:
redis-version: ['8.10', '${{ needs.redis_version.outputs.CURRENT }}', '8.6.3', '8.4.3', '8.2.6', '8.0.6' ,'7.4.9', '7.2.14']
python-version: ['3.10', '3.14']
parser-backend: ['plain']
event-loop: ['asyncio']
test-config:
- fixed-clients
- default-legacy_responses-standalone
- default-legacy_responses-cluster
- default-unified_responses-standalone
- default-unified_responses-cluster
- 2-legacy_responses-standalone
- 2-legacy_responses-cluster
- 2-unified_responses-standalone
- 2-unified_responses-cluster
- 3-legacy_responses-standalone
- 3-legacy_responses-cluster
- 3-unified_responses-standalone
- 3-unified_responses-cluster
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
name: Redis ${{ matrix.redis-version }}; Python ${{ matrix.python-version }}; RESP Parser:${{matrix.parser-backend}}; EL:${{matrix.event-loop}}; Config:${{matrix.test-config}}
steps:
- uses: actions/checkout@v7
- name: Run tests
uses: ./.github/actions/run-tests
with:
python-version: ${{ matrix.python-version }}
parser-backend: ${{ matrix.parser-backend }}
redis-version: ${{ matrix.redis-version }}
test-config: ${{ matrix.test-config }}
# Fold the MultiDBClient (active-active) integration tests into an
# existing matrix cell instead of a dedicated job, so no extra CI
# runners are added. Run them once, on the current Redis version's
# cluster cell.
run-multidb-integration: ${{ (matrix.redis-version == needs.redis_version.outputs.CURRENT && matrix.test-config == 'default-unified_responses-cluster') && 'true' || 'false' }}
otlp-auth-token: ${{ secrets.SELF_CHECK_OTEL_AUTHORIZATION_TOKEN }}
python-compatibility-tests:
runs-on: ubuntu-latest
needs: [ redis_version ]
timeout-minutes: 60
strategy:
max-parallel: 30
fail-fast: false
matrix:
redis-version: [ '${{ needs.redis_version.outputs.CURRENT }}' ]
python-version: ['3.11', '3.12', '3.13']
parser-backend: [ 'plain' ]
event-loop: [ 'asyncio' ]
test-config:
- fixed-clients
- default-legacy_responses-standalone
- default-legacy_responses-cluster
- default-unified_responses-standalone
- default-unified_responses-cluster
- 2-legacy_responses-standalone
- 2-legacy_responses-cluster
- 2-unified_responses-standalone
- 2-unified_responses-cluster
- 3-legacy_responses-standalone
- 3-legacy_responses-cluster
- 3-unified_responses-standalone
- 3-unified_responses-cluster
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
name: Redis ${{ matrix.redis-version }}; Python ${{ matrix.python-version }}; RESP Parser:${{matrix.parser-backend}}; EL:${{matrix.event-loop}}; Config:${{matrix.test-config}}
steps:
- uses: actions/checkout@v7
- name: Run tests
uses: ./.github/actions/run-tests
with:
python-version: ${{ matrix.python-version }}
parser-backend: ${{ matrix.parser-backend }}
redis-version: ${{ matrix.redis-version }}
test-config: ${{ matrix.test-config }}
otlp-auth-token: ${{ secrets.SELF_CHECK_OTEL_AUTHORIZATION_TOKEN }}
pypy-compatibility-tests:
runs-on: ubuntu-latest
needs: [ redis_version ]
# in pipeline ofter these pypy jobs hang, so their timeout is set
# to just 50 minutes - close to the max time the jobs are running at the moment
# adding more tests will make them even slower, and we will need to adjust the timeout
timeout-minutes: 50
strategy:
max-parallel: 30
fail-fast: false
matrix:
redis-version: [ '${{ needs.redis_version.outputs.CURRENT }}' ]
python-version: ['pypy-3.10', 'pypy-3.11']
parser-backend: [ 'plain' ]
event-loop: [ 'asyncio' ]
test-config:
- fixed-clients
- default-legacy_responses-standalone
- default-legacy_responses-cluster
- default-unified_responses-standalone
- default-unified_responses-cluster
- 2-legacy_responses-standalone
- 2-legacy_responses-cluster
- 2-unified_responses-standalone
- 2-unified_responses-cluster
- 3-legacy_responses-standalone
- 3-legacy_responses-cluster
- 3-unified_responses-standalone
- 3-unified_responses-cluster
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
name: PyPy Redis ${{ matrix.redis-version }}; ${{ matrix.python-version }}; RESP Parser:${{matrix.parser-backend}}; EL:${{matrix.event-loop}}; Config:${{matrix.test-config}}
steps:
- uses: actions/checkout@v7
- name: Run tests
uses: ./.github/actions/run-tests
with:
python-version: ${{ matrix.python-version }}
parser-backend: ${{ matrix.parser-backend }}
redis-version: ${{ matrix.redis-version }}
test-config: ${{ matrix.test-config }}
otlp-auth-token: ${{ secrets.SELF_CHECK_OTEL_AUTHORIZATION_TOKEN }}
hiredis-tests:
runs-on: ubuntu-latest
needs: [redis_version]
timeout-minutes: 60
strategy:
max-parallel: 30
fail-fast: false
matrix:
redis-version: [ '${{ needs.redis_version.outputs.CURRENT }}' ]
python-version: [ '3.10', '3.14']
parser-backend: [ 'hiredis' ]
hiredis-version: [ '>=3.2.0', '<3.0.0' ]
event-loop: [ 'asyncio' ]
test-config:
- fixed-clients
- default-legacy_responses-standalone
- default-legacy_responses-cluster
- default-unified_responses-standalone
- default-unified_responses-cluster
- 2-legacy_responses-standalone
- 2-legacy_responses-cluster
- 2-unified_responses-standalone
- 2-unified_responses-cluster
- 3-legacy_responses-standalone
- 3-legacy_responses-cluster
- 3-unified_responses-standalone
- 3-unified_responses-cluster
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
name: Redis ${{ matrix.redis-version }}; Python ${{ matrix.python-version }}; RESP Parser:${{matrix.parser-backend}} (${{ matrix.hiredis-version }}); EL:${{matrix.event-loop}}; Config:${{matrix.test-config}}
steps:
- uses: actions/checkout@v7
- name: Run tests
uses: ./.github/actions/run-tests
with:
python-version: ${{ matrix.python-version }}
parser-backend: ${{ matrix.parser-backend }}
redis-version: ${{ matrix.redis-version }}
hiredis-version: ${{ matrix.hiredis-version }}
test-config: ${{ matrix.test-config }}
otlp-auth-token: ${{ secrets.SELF_CHECK_OTEL_AUTHORIZATION_TOKEN }}
uvloop-tests:
runs-on: ubuntu-latest
needs: [redis_version]
timeout-minutes: 60
strategy:
max-parallel: 30
fail-fast: false
matrix:
redis-version: [ '${{ needs.redis_version.outputs.CURRENT }}' ]
python-version: [ '3.10', '3.14' ]
parser-backend: [ 'plain' ]
event-loop: [ 'uvloop' ]
test-config:
- fixed-clients
- default-legacy_responses-standalone
- default-legacy_responses-cluster
- default-unified_responses-standalone
- default-unified_responses-cluster
- 2-legacy_responses-standalone
- 2-legacy_responses-cluster
- 2-unified_responses-standalone
- 2-unified_responses-cluster
- 3-legacy_responses-standalone
- 3-legacy_responses-cluster
- 3-unified_responses-standalone
- 3-unified_responses-cluster
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
name: Redis ${{ matrix.redis-version }}; Python ${{ matrix.python-version }}; RESP Parser:${{matrix.parser-backend}}; EL:${{matrix.event-loop}}; Config:${{matrix.test-config}}
steps:
- uses: actions/checkout@v7
- name: Run tests
uses: ./.github/actions/run-tests
with:
python-version: ${{ matrix.python-version }}
parser-backend: ${{ matrix.parser-backend }}
redis-version: ${{ matrix.redis-version }}
event-loop: ${{ matrix.event-loop }}
test-config: ${{ matrix.test-config }}
otlp-auth-token: ${{ secrets.SELF_CHECK_OTEL_AUTHORIZATION_TOKEN }}
build-and-test-package:
name: Validate building and installing the package
runs-on: ubuntu-latest
needs: [redis_version]
strategy:
fail-fast: false
matrix:
extension: ['tar.gz', 'whl']
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v6
with:
python-version: "3.10"
- name: Run installed unit tests
env:
CLIENT_LIBS_TEST_IMAGE_TAG: ${{ env.CURRENT_REDIS_VERSION }}
CLIENT_LIBS_TEST_STACK_IMAGE_TAG: ${{ env.CURRENT_REDIS_VERSION }}
run: |
bash .github/workflows/install_and_test.sh ${{ matrix.extension }}
install-package-from-commit:
name: Install package from commit hash
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14', 'pypy-3.10', 'pypy-3.11']
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: install from pip
run: |
pip install --quiet git+${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git@${GITHUB_SHA}