Skip to content

Commit 3d6b571

Browse files
authored
Reorganize pipeline actions (#3951)
* Update latest redis srv image for the CI pipeline test matrix * Reorganizing the pipeline actions - separate actions for protocol 2 and protocol 3.
1 parent 877d7a2 commit 3d6b571

File tree

2 files changed

+59
-14
lines changed

2 files changed

+59
-14
lines changed

.github/actions/run-tests/action.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ inputs:
2222
description: 'Event loop to use'
2323
required: false
2424
default: 'asyncio'
25+
protocol:
26+
description: 'RESP protocol version to use'
27+
required: false
28+
default: 'all'
2529
repository:
2630
description: 'Repository to checkout'
2731
required: false
@@ -164,8 +168,12 @@ runs:
164168
echo "::endgroup::"
165169
}
166170
167-
run_tests 2 "${{inputs.event-loop}}"
168-
run_tests 3 "${{inputs.event-loop}}"
171+
if [ "${{inputs.protocol}}" == "all" ]; then
172+
run_tests 2 "${{inputs.event-loop}}"
173+
run_tests 3 "${{inputs.event-loop}}"
174+
else
175+
run_tests "${{inputs.protocol}}" "${{inputs.event-loop}}"
176+
fi
169177
shell: bash
170178

171179
- name: Debug
@@ -181,7 +189,7 @@ runs:
181189
- name: Upload test results and profiling data
182190
uses: actions/upload-artifact@v4
183191
with:
184-
name: pytest-results-redis_${{inputs.redis-version}}-python_${{inputs.python-version}}-parser_${{env.PARSER_BACKEND}}-el_${{inputs.event-loop}}
192+
name: pytest-results-redis_${{inputs.redis-version}}-python_${{inputs.python-version}}-parser_${{env.PARSER_BACKEND}}-el_${{inputs.event-loop}}-protocol_${{inputs.protocol}}
185193
path: |
186194
*-results.xml
187195
prof/**

.github/workflows/integration.yaml

Lines changed: 48 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ env:
3131
# for example after 8.2.1 is published, 8.2 image contains 8.2.1 content
3232
CURRENT_CLIENT_LIBS_TEST_STACK_IMAGE_TAG: '8.4.0'
3333
CURRENT_REDIS_VERSION: '8.4.0'
34-
REDIS_VERSION_CUSTOM_MAP: 'custom-21651605017-debian-amd64:8.6'
34+
REDIS_VERSION_CUSTOM_MAP: 'custom-21860421418-debian-amd64:8.6'
3535

3636
jobs:
3737
dependency-audit:
@@ -74,16 +74,17 @@ jobs:
7474
timeout-minutes: 60
7575
needs: redis_version
7676
strategy:
77-
max-parallel: 15
77+
max-parallel: 30
7878
fail-fast: false
7979
matrix:
80-
redis-version: ['custom-21651605017-debian-amd64', '${{ needs.redis_version.outputs.CURRENT }}', '8.2', '8.0.2' ,'7.4.4', '7.2.9']
80+
redis-version: ['custom-21860421418-debian-amd64', '${{ needs.redis_version.outputs.CURRENT }}', '8.2', '8.0.2' ,'7.4.4', '7.2.9']
8181
python-version: ['3.10', '3.14']
8282
parser-backend: ['plain']
8383
event-loop: ['asyncio']
84+
protocol: ['2', '3']
8485
env:
8586
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
86-
name: Redis ${{ matrix.redis-version }}; Python ${{ matrix.python-version }}; RESP Parser:${{matrix.parser-backend}}; EL:${{matrix.event-loop}}
87+
name: Redis ${{ matrix.redis-version }}; Python ${{ matrix.python-version }}; RESP Parser:${{matrix.parser-backend}}; EL:${{matrix.event-loop}}; Protocol:${{matrix.protocol}}
8788
steps:
8889
- uses: actions/checkout@v6
8990
- name: Run tests
@@ -92,22 +93,24 @@ jobs:
9293
python-version: ${{ matrix.python-version }}
9394
parser-backend: ${{ matrix.parser-backend }}
9495
redis-version: ${{ matrix.redis-version }}
96+
protocol: ${{ matrix.protocol }}
9597

9698
python-compatibility-tests:
9799
runs-on: ubuntu-latest
98100
needs: [ redis_version ]
99101
timeout-minutes: 60
100102
strategy:
101-
max-parallel: 15
103+
max-parallel: 30
102104
fail-fast: false
103105
matrix:
104106
redis-version: [ '${{ needs.redis_version.outputs.CURRENT }}' ]
105-
python-version: ['3.11', '3.12', '3.13', 'pypy-3.10', 'pypy-3.11']
107+
python-version: ['3.11', '3.12', '3.13']
106108
parser-backend: [ 'plain' ]
107109
event-loop: [ 'asyncio' ]
110+
protocol: ['2', '3']
108111
env:
109112
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
110-
name: Redis ${{ matrix.redis-version }}; Python ${{ matrix.python-version }}; RESP Parser:${{matrix.parser-backend}}; EL:${{matrix.event-loop}}
113+
name: Redis ${{ matrix.redis-version }}; Python ${{ matrix.python-version }}; RESP Parser:${{matrix.parser-backend}}; EL:${{matrix.event-loop}}; Protocol:${{matrix.protocol}}
111114
steps:
112115
- uses: actions/checkout@v6
113116
- name: Run tests
@@ -116,23 +119,54 @@ jobs:
116119
python-version: ${{ matrix.python-version }}
117120
parser-backend: ${{ matrix.parser-backend }}
118121
redis-version: ${{ matrix.redis-version }}
122+
protocol: ${{ matrix.protocol }}
123+
124+
pypy-compatibility-tests:
125+
runs-on: ubuntu-latest
126+
needs: [ redis_version ]
127+
# in pipeline ofter these pypy jobs hang, so their timeout is set
128+
# to just 40 minutes - close to the max time the jobs are running at the moment
129+
# adding more tests will make them even slower, and we will need to adjust the timeout
130+
timeout-minutes: 40
131+
strategy:
132+
max-parallel: 30
133+
fail-fast: false
134+
matrix:
135+
redis-version: [ '${{ needs.redis_version.outputs.CURRENT }}' ]
136+
python-version: ['pypy-3.10', 'pypy-3.11']
137+
parser-backend: [ 'plain' ]
138+
event-loop: [ 'asyncio' ]
139+
protocol: ['2', '3']
140+
env:
141+
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
142+
name: PyPy Redis ${{ matrix.redis-version }}; ${{ matrix.python-version }}; RESP Parser:${{matrix.parser-backend}}; EL:${{matrix.event-loop}}; Protocol:${{matrix.protocol}}
143+
steps:
144+
- uses: actions/checkout@v6
145+
- name: Run tests
146+
uses: ./.github/actions/run-tests
147+
with:
148+
python-version: ${{ matrix.python-version }}
149+
parser-backend: ${{ matrix.parser-backend }}
150+
redis-version: ${{ matrix.redis-version }}
151+
protocol: ${{ matrix.protocol }}
119152

120153
hiredis-tests:
121154
runs-on: ubuntu-latest
122155
needs: [redis_version]
123156
timeout-minutes: 60
124157
strategy:
125-
max-parallel: 15
158+
max-parallel: 30
126159
fail-fast: false
127160
matrix:
128161
redis-version: [ '${{ needs.redis_version.outputs.CURRENT }}' ]
129162
python-version: [ '3.10', '3.14']
130163
parser-backend: [ 'hiredis' ]
131164
hiredis-version: [ '>=3.2.0', '<3.0.0' ]
132165
event-loop: [ 'asyncio' ]
166+
protocol: ['2', '3']
133167
env:
134168
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
135-
name: Redis ${{ matrix.redis-version }}; Python ${{ matrix.python-version }}; RESP Parser:${{matrix.parser-backend}} (${{ matrix.hiredis-version }}); EL:${{matrix.event-loop}}
169+
name: Redis ${{ matrix.redis-version }}; Python ${{ matrix.python-version }}; RESP Parser:${{matrix.parser-backend}} (${{ matrix.hiredis-version }}); EL:${{matrix.event-loop}}; Protocol:${{matrix.protocol}}
136170
steps:
137171
- uses: actions/checkout@v6
138172
- name: Run tests
@@ -142,22 +176,24 @@ jobs:
142176
parser-backend: ${{ matrix.parser-backend }}
143177
redis-version: ${{ matrix.redis-version }}
144178
hiredis-version: ${{ matrix.hiredis-version }}
179+
protocol: ${{ matrix.protocol }}
145180

146181
uvloop-tests:
147182
runs-on: ubuntu-latest
148183
needs: [redis_version]
149184
timeout-minutes: 60
150185
strategy:
151-
max-parallel: 15
186+
max-parallel: 30
152187
fail-fast: false
153188
matrix:
154189
redis-version: [ '${{ needs.redis_version.outputs.CURRENT }}' ]
155190
python-version: [ '3.10', '3.14' ]
156191
parser-backend: [ 'plain' ]
157192
event-loop: [ 'uvloop' ]
193+
protocol: ['2', '3']
158194
env:
159195
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
160-
name: Redis ${{ matrix.redis-version }}; Python ${{ matrix.python-version }}; RESP Parser:${{matrix.parser-backend}}; EL:${{matrix.event-loop}}
196+
name: Redis ${{ matrix.redis-version }}; Python ${{ matrix.python-version }}; RESP Parser:${{matrix.parser-backend}}; EL:${{matrix.event-loop}}; Protocol:${{matrix.protocol}}
161197
steps:
162198
- uses: actions/checkout@v6
163199
- name: Run tests
@@ -167,6 +203,7 @@ jobs:
167203
parser-backend: ${{ matrix.parser-backend }}
168204
redis-version: ${{ matrix.redis-version }}
169205
event-loop: ${{ matrix.event-loop }}
206+
protocol: ${{ matrix.protocol }}
170207

171208
build-and-test-package:
172209
name: Validate building and installing the package

0 commit comments

Comments
 (0)