@@ -190,7 +190,7 @@ jobs:
190
190
with :
191
191
python-version : ${{ matrix.python }}
192
192
193
- - name : Install the package
193
+ - name : Install the package with pip
194
194
run : pip install git+$GITHUB_SERVER_URL/$GITHUB_REPOSITORY"@"$GITHUB_REF_NAME
195
195
196
196
- name : Install test requirements
@@ -275,3 +275,83 @@ jobs:
275
275
run : |
276
276
cat tarantool.log || true
277
277
kill $(cat tarantool.pid) || true
278
+
279
+ run_tests_with_install_windows :
280
+ # We want to run on external PRs, but not on our own internal
281
+ # PRs as they'll be run by the push to the branch.
282
+ #
283
+ # The main trick is described here:
284
+ # https://github.com/Dart-Code/Dart-Code/pull/2375
285
+ if : (github.event_name == 'push') ||
286
+ (github.event_name == 'pull_request' &&
287
+ github.event.pull_request.head.repo.full_name != github.repository)
288
+ runs-on : ubuntu-20.04
289
+
290
+ strategy :
291
+ fail-fast : false
292
+
293
+ matrix :
294
+ tarantool :
295
+ - ' 2.10'
296
+ python :
297
+ - ' 3.6'
298
+ - ' 3.7'
299
+ - ' 3.8'
300
+ - ' 3.9'
301
+ - ' 3.10'
302
+ steps :
303
+ - name : Clone the connector repo
304
+ uses : actions/checkout@v2
305
+
306
+ - name : Remove connector source code
307
+ run : |
308
+ rm -rf tarantool
309
+ rm setup.py
310
+
311
+ - name : Install tarantool ${{ matrix.tarantool }}
312
+ uses : tarantool/setup-tarantool@v1
313
+ with :
314
+ tarantool-version : ${{ matrix.tarantool }}
315
+
316
+ - name : Setup Python for tests
317
+ uses : actions/setup-python@v2
318
+ with :
319
+ python-version : ${{ matrix.python }}
320
+
321
+ - name : Install the package with pip
322
+ run : pip install git+$GITHUB_SERVER_URL/$GITHUB_REPOSITORY"@"$GITHUB_REF_NAME
323
+
324
+ - name : Install test requirements
325
+ run : pip install -r requirements-test.txt
326
+
327
+ - name : Setup WSL for tarantool
328
+ uses : Vampire/setup-wsl@v1
329
+ with :
330
+ distribution : Ubuntu-20.04
331
+
332
+ - name : Install tarantool ${{ matrix.tarantool }} for WSL
333
+ shell : wsl-bash_Ubuntu-20.04 {0}
334
+ run : |
335
+ curl -L https://tarantool.io/release/2/installer.sh | bash -s
336
+ sudo apt install -y tarantool=${{ matrix.tarantool }} tarantool-dev=${{ matrix.tarantool }}
337
+
338
+ - name : Setup test tarantool instance
339
+ shell : wsl-bash_Ubuntu-20.04 {0}
340
+ run : |
341
+ rm -f ./tarantool.pid ./tarantool.log
342
+ TNT_PID=$(tarantool ./test/suites/lib/tarantool_python_ci.lua > tarantool.log 2>&1 & echo $!)
343
+ touch tarantool.pid
344
+ echo $TNT_PID > ./tarantool.pid
345
+
346
+ - name : Run tests
347
+ env :
348
+ REMOTE_TARANTOOL_HOST : localhost
349
+ REMOTE_TARANTOOL_CONSOLE_PORT : 3302
350
+ run : python -m unittest discover -v
351
+
352
+ - name : Stop test tarantool instance
353
+ if : ${{ always() }}
354
+ shell : wsl-bash_Ubuntu-20.04 {0}
355
+ run : |
356
+ cat tarantool.log || true
357
+ kill $(cat tarantool.pid) || true
0 commit comments