Skip to content

Commit b8458d3

Browse files
Try this
2 Fix syntax Will it work? I want to see fail message Custom msgpack fix command Try less jobs there is no 0.4.0 Try this check ports Try telnet I had never programmed network stuff for Windows 1 ping ip use windows syntax Try to use tarantool service Try WSL Try WSL Hide ping Try to run tests Run in background try this show netstat Show me your secrets really? install it ? print ping value print time Print more times Increase precision SKip test
1 parent 0f95f28 commit b8458d3

File tree

3 files changed

+149
-1
lines changed

3 files changed

+149
-1
lines changed

.github/workflows/testing.yml

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
name: testing
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
run_tests_linux:
9+
# We want to run on external PRs, but not on our own internal
10+
# PRs as they'll be run by the push to the branch.
11+
#
12+
# The main trick is described here:
13+
# https://github.com/Dart-Code/Dart-Code/pull/2375
14+
if: github.event_name == 'push' ||
15+
github.event.pull_request.head.repo.full_name != github.repository
16+
17+
runs-on: ubuntu-20.04
18+
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
tarantool:
23+
- '1.10'
24+
- '2.8'
25+
- '2.9'
26+
- '2.x-latest'
27+
python:
28+
- '2.7'
29+
- '3.6'
30+
# - '3.7'
31+
# - '3.8'
32+
# - '3.9'
33+
- '3.10'
34+
python-msgpack:
35+
- '0.5.0'
36+
- '0.6.2'
37+
- '1.0.0'
38+
- 'latest'
39+
40+
steps:
41+
- name: Clone the connector
42+
uses: actions/checkout@v2
43+
44+
- name: Setup tarantool ${{ matrix.tarantool }}
45+
if: matrix.tarantool != '2.x-latest'
46+
uses: tarantool/setup-tarantool@v1
47+
with:
48+
tarantool-version: ${{ matrix.tarantool }}
49+
50+
- name: Setup Tarantool 2.x (latest)
51+
if: matrix.tarantool == '2.x-latest'
52+
run: |
53+
curl -L https://tarantool.io/pre-release/2/installer.sh | sudo bash
54+
sudo apt install -y tarantool tarantool-dev
55+
56+
- name: Setup python3 for tests
57+
uses: actions/setup-python@v2
58+
with:
59+
python-version: ${{ matrix.python }}
60+
61+
- name: Setup msgpack python package
62+
if: matrix.python-msgpack != 'latest'
63+
# 'latest' msgpack will be installed as a part of requirements.txt
64+
run: pip install msgpack==${{ matrix.python-msgpack }}
65+
66+
- name: Install connector requirements
67+
run: pip install -r requirements.txt
68+
69+
- name: Install test requirements
70+
run: pip install -r requirements-test.txt
71+
72+
- name: Run tests
73+
run: make test
74+
75+
run_tests_windows:
76+
# We want to run on external PRs, but not on our own internal
77+
# PRs as they'll be run by the push to the branch.
78+
#
79+
# The main trick is described here:
80+
# https://github.com/Dart-Code/Dart-Code/pull/2375
81+
if: github.event_name == 'push' ||
82+
github.event.pull_request.head.repo.full_name != github.repository
83+
84+
runs-on: windows-2022
85+
86+
strategy:
87+
fail-fast: false
88+
matrix:
89+
python:
90+
- '2.7'
91+
- '3.5'
92+
- '3.6'
93+
- '3.7'
94+
- '3.8'
95+
- '3.9'
96+
- '3.10'
97+
python-msgpack:
98+
- '0.5.0'
99+
- '0.6.2'
100+
- '1.0.0'
101+
- 'latest'
102+
103+
steps:
104+
- name: Clone the connector
105+
uses: actions/checkout@v2
106+
107+
- name: Setup python3 for tests
108+
uses: actions/setup-python@v2
109+
with:
110+
python-version: ${{ matrix.python }}
111+
112+
- name: Setup msgpack python package
113+
if: matrix.python-msgpack != 'latest'
114+
# 'latest' msgpack will be installed as a part of requirements.txt
115+
run: pip install msgpack==${{ matrix.python-msgpack }}
116+
117+
- name: Install connector requirements
118+
run: pip install -r requirements.txt
119+
120+
- name: Install test requirements
121+
run: pip install -r requirements-test.txt
122+
123+
# - name: Check ip
124+
# run: ping /n 3 ${{ secrets.REMOTE_TARANTOOL_HOST }}
125+
126+
- name: Setup WSL
127+
uses: Vampire/setup-wsl@v1
128+
with:
129+
distribution: Ubuntu-20.04
130+
131+
- shell: wsl-bash_Ubuntu-20.04 {0}
132+
run: |
133+
curl -L https://tarantool.io/pre-release/2/installer.sh | sudo bash
134+
sudo apt install -y tarantool tarantool-dev
135+
tarantool ./test/suites/lib/tarantool_python_ci.lua &
136+
sudo apt-get install net-tools -y
137+
netstat -a
138+
139+
- run: netstat -a
140+
141+
- name: Run tests
142+
env:
143+
REMOTE_TARANTOOL_HOST: localhost
144+
REMOTE_TARANTOOL_CONSOLE_PORT: 3302
145+
run: make test

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
msgpack>=0.4.0
1+
msgpack>=0.5.0

test/suites/test_dml.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@ def test_05_ping(self):
146146
# Simple ping test
147147
# * No exceptions are raised
148148
# * Ping time > 0
149+
if sys.platform.startswith("win"):
150+
self.skipTest("Windows clock precision causes test to fail sometimes, see #214")
151+
149152
self.assertTrue(self.con.ping() > 0)
150153
self.assertEqual(self.con.ping(notime=True), "Success")
151154

0 commit comments

Comments
 (0)