@@ -17,105 +17,111 @@ on:
17
17
- cron : ' 0 1 * * *' # nightly build
18
18
19
19
concurrency :
20
- group : ${{ github.event.pull_request.number || github.ref }}
20
+ group : ${{ github.event.pull_request.number || github.ref }}-integration
21
21
cancel-in-progress : true
22
22
23
23
permissions :
24
24
contents : read # to fetch code (actions/checkout)
25
25
26
+ env :
27
+ CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
28
+ REDIS_IMAGE : redis/redis-stack-server:7.4.0-rc1
29
+ REDIS_STACK_IMAGE : redis/redis-stack-server:7.4.0-rc1
30
+
26
31
jobs :
32
+ dependency-audit :
33
+ name : Dependency audit
34
+ runs-on : ubuntu-latest
35
+ steps :
36
+ - uses : actions/checkout@v4
37
+
38
+ with :
39
+ inputs : requirements.txt dev_requirements.txt
40
+ ignore-vulns : |
41
+ GHSA-w596-4wvx-j9j6 # subversion related git pull, dependency for pytest. There is no impact here.
27
42
28
- dependency-audit :
29
- name : Dependency audit
30
- runs-on : ubuntu-latest
31
- steps :
32
- - uses : actions/checkout@v4
33
-
34
- with :
35
- inputs : requirements.txt dev_requirements.txt
36
- ignore-vulns : |
37
- GHSA-w596-4wvx-j9j6 # subversion related git pull, dependency for pytest. There is no impact here.
38
-
39
- lint :
40
- name : Code linters
41
- runs-on : ubuntu-latest
42
- steps :
43
- - uses : actions/checkout@v4
44
- - uses : actions/setup-python@v5
45
- with :
46
- python-version : 3.9
47
- cache : ' pip'
48
- - name : run code linters
49
- run : |
50
- pip install -r dev_requirements.txt
51
- invoke linters
52
-
53
- run-tests :
54
- runs-on : ubuntu-latest
55
- timeout-minutes : 60
56
- strategy :
57
- max-parallel : 15
58
- fail-fast : false
59
- matrix :
60
- python-version : ['3.8', '3.9', '3.10', '3.11', '3.12', 'pypy-3.8', 'pypy-3.9']
61
- test-type : ['standalone', 'cluster']
62
- connection-type : ['hiredis', 'plain']
63
- env :
64
- ACTIONS_ALLOW_UNSECURE_COMMANDS : true
65
- name : Python ${{ matrix.python-version }} ${{matrix.test-type}}-${{matrix.connection-type}} tests
66
- steps :
67
- - uses : actions/checkout@v4
68
- - uses : actions/setup-python@v5
69
- with :
70
- python-version : ${{ matrix.python-version }}
71
- cache : ' pip'
72
- - name : run tests
73
- run : |
74
- pip install -U setuptools wheel
75
- pip install -r requirements.txt
76
- pip install -r dev_requirements.txt
77
- if [ "${{matrix.connection-type}}" == "hiredis" ]; then
78
- pip install hiredis
79
- fi
80
- invoke devenv
81
- sleep 10 # time to settle
82
- invoke ${{matrix.test-type}}-tests
83
-
84
- - uses : actions/upload-artifact@v4
85
- if : success() || failure()
86
- with :
87
- name : pytest-results-${{matrix.test-type}}-${{matrix.connection-type}}-${{matrix.python-version}}
88
- path : ' ${{matrix.test-type}}*results.xml'
89
-
90
- - name : Upload codecov coverage
91
- uses : codecov/codecov-action@v3
92
- with :
93
- fail_ci_if_error : false
94
-
95
- - name : View Test Results
96
- uses : dorny/test-reporter@v1
97
- if : success() || failure()
98
- continue-on-error : true
99
- with :
100
- name : Test Results ${{matrix.python-version}} ${{matrix.test-type}}-${{matrix.connection-type}}
101
- path : ' *.xml'
102
- reporter : java-junit
103
- list-suites : all
104
- list-tests : all
105
- max-annotations : 10
106
- fail-on-error : ' false'
107
-
108
- resp3_tests :
43
+ lint :
44
+ name : Code linters
45
+ runs-on : ubuntu-latest
46
+ steps :
47
+ - uses : actions/checkout@v4
48
+ - uses : actions/setup-python@v5
49
+ with :
50
+ python-version : 3.9
51
+ cache : ' pip'
52
+ - name : run code linters
53
+ run : |
54
+ pip install -r dev_requirements.txt
55
+ invoke linters
56
+
57
+ run-tests :
58
+ runs-on : ubuntu-latest
59
+ timeout-minutes : 60
60
+ strategy :
61
+ max-parallel : 15
62
+ fail-fast : false
63
+ matrix :
64
+ python-version : ['3.8', '3.9', '3.10', '3.11', '3.12', 'pypy-3.8', 'pypy-3.9']
65
+ test-type : ['standalone', 'cluster']
66
+ connection-type : ['hiredis', 'plain']
67
+ env :
68
+ ACTIONS_ALLOW_UNSECURE_COMMANDS : true
69
+ name : Python ${{ matrix.python-version }} ${{matrix.test-type}}-${{matrix.connection-type}} tests
70
+ steps :
71
+ - uses : actions/checkout@v4
72
+ - uses : actions/setup-python@v5
73
+ with :
74
+ python-version : ${{ matrix.python-version }}
75
+ cache : ' pip'
76
+ - name : run tests
77
+ run : |
78
+ pip install -U setuptools wheel
79
+ pip install -r requirements.txt
80
+ pip install -r dev_requirements.txt
81
+ if [ "${{matrix.connection-type}}" == "hiredis" ]; then
82
+ pip install hiredis
83
+ fi
84
+ invoke devenv
85
+ sleep 10 # time to settle
86
+ invoke ${{matrix.test-type}}-tests
87
+
88
+ - uses : actions/upload-artifact@v4
89
+ if : success() || failure()
90
+ with :
91
+ name : pytest-results-${{matrix.test-type}}-${{matrix.connection-type}}-${{matrix.python-version}}
92
+ path : ' ${{matrix.test-type}}*results.xml'
93
+
94
+ - name : Upload codecov coverage
95
+ uses : codecov/codecov-action@v4
96
+ with :
97
+ fail_ci_if_error : false
98
+
99
+ - name : View Test Results
100
+ uses : dorny/test-reporter@v1
101
+ if : success() || failure()
102
+ continue-on-error : true
103
+ with :
104
+ name : Test Results ${{matrix.python-version}} ${{matrix.test-type}}-${{matrix.connection-type}}
105
+ path : ' *.xml'
106
+ reporter : java-junit
107
+ list-suites : all
108
+ list-tests : all
109
+ max-annotations : 10
110
+ fail-on-error : ' false'
111
+
112
+ resp3_tests :
109
113
runs-on : ubuntu-latest
110
114
strategy :
111
115
fail-fast : false
112
116
matrix :
113
117
python-version : ['3.8', '3.12']
114
118
test-type : ['standalone', 'cluster']
115
119
connection-type : ['hiredis', 'plain']
116
- protocol : ['3']
120
+ exclude :
121
+ - test-type : ' cluster'
122
+ connection-type : ' hiredis'
117
123
env :
118
- ACTIONS_ALLOW_UNSECURE_COMMANDS : true
124
+ ACTIONS_ALLOW_UNSECURE_COMMANDS : true
119
125
name : RESP3 [${{ matrix.python-version }} ${{matrix.test-type}}-${{matrix.connection-type}}]
120
126
steps :
121
127
- uses : actions/checkout@v4
@@ -132,11 +138,35 @@ jobs:
132
138
pip install hiredis
133
139
fi
134
140
invoke devenv
135
- sleep 5 # time to settle
136
- invoke ${{matrix.test-type}}-tests
137
- invoke ${{matrix.test-type}}-tests --uvloop
141
+ sleep 10 # time to settle
142
+ invoke ${{matrix.test-type}}-tests --protocol=3
143
+ invoke ${{matrix.test-type}}-tests --uvloop --protocol=3
144
+
145
+ - uses : actions/upload-artifact@v4
146
+ if : success() || failure()
147
+ with :
148
+ name : pytest-results-${{matrix.test-type}}-${{matrix.connection-type}}-${{matrix.python-version}}-resp3
149
+ path : ' ${{matrix.test-type}}*results.xml'
150
+
151
+ - name : Upload codecov coverage
152
+ uses : codecov/codecov-action@v4
153
+ with :
154
+ fail_ci_if_error : false
155
+
156
+ - name : View Test Results
157
+ uses : dorny/test-reporter@v1
158
+ if : success() || failure()
159
+ continue-on-error : true
160
+ with :
161
+ name : Test Results ${{matrix.python-version}} ${{matrix.test-type}}-${{matrix.connection-type}}-resp3
162
+ path : ' *.xml'
163
+ reporter : java-junit
164
+ list-suites : all
165
+ list-tests : all
166
+ max-annotations : 10
167
+ fail-on-error : ' false'
138
168
139
- build_and_test_package :
169
+ build_and_test_package :
140
170
name : Validate building and installing the package
141
171
runs-on : ubuntu-latest
142
172
needs : [run-tests]
@@ -153,7 +183,7 @@ jobs:
153
183
run : |
154
184
bash .github/workflows/install_and_test.sh ${{ matrix.extension }}
155
185
156
- install_package_from_commit :
186
+ install_package_from_commit :
157
187
name : Install package from commit hash
158
188
runs-on : ubuntu-latest
159
189
strategy :
0 commit comments