@@ -56,19 +56,18 @@ jobs:
56
56
pip install -r dev_requirements.txt
57
57
invoke linters
58
58
59
- resp2-tests :
59
+ standalone :
60
60
runs-on : ubuntu-latest
61
61
timeout-minutes : 60
62
62
strategy :
63
63
max-parallel : 15
64
64
fail-fast : false
65
65
matrix :
66
- python-version : ['3.8', '3.9', '3.10', '3.11', '3.12', 'pypy-3.8', 'pypy-3.9']
67
- test-type : ['standalone', 'cluster']
66
+ python-version : [ '3.8', '3.9', '3.10', '3.11', '3.12', 'pypy-3.8', 'pypy-3.9' ]
68
67
connection-type : ['hiredis', 'plain']
69
68
env :
70
69
ACTIONS_ALLOW_UNSECURE_COMMANDS : true
71
- name : RESP2 ${{ matrix.python-version }} ${{matrix.test-type}}-${{matrix.connection-type}}
70
+ name : Standalone- ${{ matrix.python-version }} ${{matrix.test-type}}-${{matrix.connection-type}}
72
71
steps :
73
72
- uses : actions/checkout@v4
74
73
@@ -77,25 +76,39 @@ jobs:
77
76
python-version : ${{ matrix.python-version }}
78
77
cache : ' pip'
79
78
80
- - name : Run tests
79
+ - name : Build infrastructure
81
80
run : |
81
+ pip install coverage
82
82
pip install -U setuptools wheel
83
83
pip install -r requirements.txt
84
84
pip install -r dev_requirements.txt
85
85
if [ "${{matrix.connection-type}}" == "hiredis" ]; then
86
86
pip install hiredis
87
87
fi
88
+ mkdir coverage
88
89
invoke devenv
89
90
sleep 10 # time to settle
90
- invoke ${{matrix.test-type}}-tests
91
+
92
+ - name : Run RESP2 tests
93
+ run : |
94
+ invoke standalone-tests
91
95
ls -1
92
96
97
+ - name : Run RESP3 tests
98
+ if : ${{matrix.python-version == '3.8' || matrix.python-version == '3.12'}}
99
+ run : |
100
+ invoke standalone-tests --uvloop --protocol=3
101
+ invoke standalone-tests --protocol=3
102
+
103
+ - name : Combine test coverage
104
+ run : coverage combine combined-coverage.xml coverage/
105
+
93
106
- name : Upload test results and profiling data
94
107
uses : actions/upload-artifact@v4
95
108
with :
96
- name : pytest-results-${{matrix.test-type}} -${{matrix.connection-type}}-${{matrix.python-version}}
109
+ name : pytest-results-standalone -${{matrix.connection-type}}-${{matrix.python-version}}
97
110
path : |
98
- ${{matrix.test-type}}*-results .xml
111
+ combined-coverage .xml
99
112
prof/**
100
113
profile_output*
101
114
if-no-files-found : error
@@ -106,21 +119,18 @@ jobs:
106
119
with :
107
120
fail_ci_if_error : false
108
121
109
- resp3-tests :
122
+ cluster :
110
123
runs-on : ubuntu-latest
124
+ timeout-minutes : 60
111
125
strategy :
126
+ max-parallel : 15
112
127
fail-fast : false
113
128
matrix :
114
- python-version : ['3.8', '3.12']
115
- test-type : ['standalone', 'cluster']
129
+ python-version : [ '3.8', '3.9', '3.10', '3.11', '3.12', 'pypy-3.8', 'pypy-3.9' ]
116
130
connection-type : ['hiredis', 'plain']
117
- event-loop : ['asyncio', 'uvloop']
118
- exclude :
119
- - test-type : ' cluster'
120
- connection-type : ' hiredis'
121
131
env :
122
132
ACTIONS_ALLOW_UNSECURE_COMMANDS : true
123
- name : RESP3 ${{ matrix.python-version }} ${{matrix.test-type}}-${{matrix.connection-type}}-${{matrix.event-loop }}
133
+ name : Cluster- ${{ matrix.python-version }} ${{matrix.test-type}}-${{matrix.connection-type}}
124
134
steps :
125
135
- uses : actions/checkout@v4
126
136
@@ -129,28 +139,39 @@ jobs:
129
139
python-version : ${{ matrix.python-version }}
130
140
cache : ' pip'
131
141
132
- - name : Run tests
142
+ - name : Build infrastructure
133
143
run : |
144
+ pip install coverage
134
145
pip install -U setuptools wheel
135
146
pip install -r requirements.txt
136
147
pip install -r dev_requirements.txt
137
148
if [ "${{matrix.connection-type}}" == "hiredis" ]; then
138
- pip install hiredis
149
+ pip install hiredis
139
150
fi
140
- invoke devenv
151
+ mkdir coverage
152
+ invoke devenv-cluster
141
153
sleep 10 # time to settle
142
- if [ "${{matrix.event-loop}}" == "uvloop" ]; then
143
- invoke ${{matrix.test-type}}-tests --uvloop --protocol=3
144
- else
145
- invoke ${{matrix.test-type}}-tests --protocol=3
146
- fi
154
+
155
+ - name : Run RESP2 tests
156
+ run : |
157
+ invoke cluster-tests
158
+ ls -1
159
+
160
+ - name : Run RESP3 tests
161
+ if : ${{matrix.python-version == '3.8' || matrix.python-version == '3.12'}}
162
+ run : |
163
+ invoke cluster-tests --uvloop --protocol=3
164
+ invoke cluster-tests --protocol=3
165
+
166
+ - name : Combine test coverage
167
+ run : coverage combine combined-coverage.xml coverage/
147
168
148
169
- name : Upload test results and profiling data
149
170
uses : actions/upload-artifact@v4
150
171
with :
151
- name : pytest-results-${{matrix.test-type}}- ${{matrix.connection-type}}-${{matrix.python-version}}-${{matrix.event-loop}}-resp3
172
+ name : pytest-results-cluster- ${{matrix.connection-type}}-${{matrix.python-version}}
152
173
path : |
153
- ${{matrix.test-type}}*-results .xml
174
+ combined-coverage .xml
154
175
prof/**
155
176
profile_output*
156
177
if-no-files-found : error
0 commit comments