@@ -180,6 +180,107 @@ jobs:
180
180
mkdir -p /tmp/logstash/report/{img,word,pdf,excel} && mkdir -p /tmp/iast_cache/package && mkdir -p /tmp/logstash/batchagent
181
181
python3 ./deploy/docker/version_update.py || true
182
182
python manage.py test
183
+
184
+ Run-Unit-TEST-In-Cython :
185
+ runs-on : ubuntu-latest
186
+ services :
187
+ mysql :
188
+ image : dongtai/dongtai-mysql-unittest:latest
189
+ ports :
190
+ - 3306:3306
191
+ options : >-
192
+ --health-cmd "mysqladmin ping --silent"
193
+ --health-interval 10s
194
+ --health-timeout 180s
195
+ --health-retries 10
196
+ redis :
197
+ image : dongtai/dongtai-redis:latest
198
+ ports :
199
+ - 6379:6379
200
+ options : >-
201
+ --health-cmd "redis-cli ping"
202
+ --health-interval 10s
203
+ --health-timeout 5s
204
+ --health-retries 5
205
+ strategy :
206
+ max-parallel : 4
207
+ matrix :
208
+ python-version : ["3.10"]
209
+
210
+ steps :
211
+ - name : Checkout
212
+ uses : actions/checkout@v2
213
+ - uses : actions/setup-python@v4
214
+ with :
215
+ python-version : " 3.10"
216
+
217
+ - name : Install dependencies
218
+ run : |
219
+ sudo apt-get install build-essential cmake ninja-build python3-dev cython3 pybind11-dev libre2-dev -y
220
+ python -m pip install --upgrade pip
221
+ pip install -r requirements.txt
222
+
223
+ - name : Django Unit Testing
224
+ run : |
225
+ cp dongtai_conf/conf/config.ini.test dongtai_conf/conf/config.ini
226
+ mkdir -p /tmp/logstash/report/{img,word,pdf,excel} && mkdir -p /tmp/iast_cache/package && mkdir -p /tmp/logstash/batchagent
227
+ python3 ./deploy/docker/version_update.py || true
228
+ python setup.py build_ext --inplace
229
+ python manage.py test
230
+
231
+ Run-API-TEST-With-Cython :
232
+ runs-on : ubuntu-latest
233
+ services :
234
+ mysql :
235
+ image : dongtai/dongtai-mysql-unittest:latest
236
+ ports :
237
+ - 3306:3306
238
+ options : >-
239
+ --health-cmd "mysqladmin ping --silent"
240
+ --health-interval 10s
241
+ --health-timeout 180s
242
+ --health-retries 10
243
+ redis :
244
+ image : dongtai/dongtai-redis:latest
245
+ ports :
246
+ - 6379:6379
247
+ options : >-
248
+ --health-cmd "redis-cli ping"
249
+ --health-interval 10s
250
+ --health-timeout 5s
251
+ --health-retries 5
252
+ strategy :
253
+ max-parallel : 4
254
+ matrix :
255
+ python-version : ["3.10"]
256
+
257
+ steps :
258
+ - name : Checkout
259
+ uses : actions/checkout@v2
260
+ - uses : actions/setup-python@v4
261
+ with :
262
+ python-version : " 3.10"
263
+
264
+ - name : Install dependencies
265
+ run : |
266
+ sudo apt-get install build-essential cmake ninja-build python3-dev cython3 pybind11-dev libre2-dev -y
267
+ python -m pip install --upgrade pip
268
+ pip install -r requirements.txt
269
+ pip install schemathesis
270
+ pip install httpx
271
+
272
+ - name : Django Api Testing
273
+ run : |
274
+ mysql --host=127.0.0.1 -uroot -p'dongtai-iast' -D dongtai_webapi < /home/runner/work/DongTai/DongTai/test/init.sql
275
+ cp dongtai_conf/conf/config.ini.test dongtai_conf/conf/config.ini
276
+ export DOC=TRUE
277
+ mkdir -p /tmp/logstash/report/{img,word,pdf,excel} && mkdir -p /tmp/iast_cache/package && mkdir -p /tmp/logstash/batchagent
278
+ python3 ./deploy/docker/version_update.py || true
279
+ python setup.py build_ext --inplace
280
+ python3 manage.py runserver 0.0.0.0:8000 > webapi.log &
281
+ sleep 15
282
+ schemathesis run --base-url "http://localhost:8000/" -H 'Authorization: Token 67aebd78e700ad36a82a152276196b5f49fafeb0' http://localhost:8000/api/XZPcGFKoxYXScwGjQtJx8u/schema/ --hypothesis-suppress-health-check=data_too_large,filter_too_much,too_slow,return_value,large_base_example,not_a_test_method,function_scoped_fixture --validate-schema=false --hypothesis-verbosity normal
283
+
183
284
analyze :
184
285
name : Analyze
185
286
runs-on : ubuntu-latest
0 commit comments