@@ -54,3 +54,141 @@ jobs:
54
54
name : pip_dist
55
55
path : dist
56
56
retention-days : 1
57
+
58
+ run_tests_pip_package_install_linux :
59
+ needs : pack_pip
60
+
61
+ # We want to run on external PRs, but not on our own internal
62
+ # PRs as they'll be run by the push to the branch.
63
+ #
64
+ # The main trick is described here:
65
+ # https://github.com/Dart-Code/Dart-Code/pull/2375
66
+ if : (github.event_name == 'push') ||
67
+ (github.event_name == 'pull_request' &&
68
+ github.event.pull_request.head.repo.full_name != github.repository)
69
+ runs-on : ubuntu-20.04
70
+
71
+ strategy :
72
+ fail-fast : false
73
+
74
+ matrix :
75
+ tarantool :
76
+ - ' 2.10'
77
+ python :
78
+ - ' 3.6'
79
+ - ' 3.7'
80
+ - ' 3.8'
81
+ - ' 3.9'
82
+ - ' 3.10'
83
+ steps :
84
+ - name : Clone the connector repo
85
+ uses : actions/checkout@v2
86
+
87
+ - name : Setup Python
88
+ uses : actions/setup-python@v2
89
+ with :
90
+ python-version : ${{ matrix.python }}
91
+
92
+ - name : Remove connector source code
93
+ run : python .github/scripts/remove_source_code.py
94
+
95
+ - name : Install tarantool ${{ matrix.tarantool }}
96
+ uses : tarantool/setup-tarantool@v1
97
+ with :
98
+ tarantool-version : ${{ matrix.tarantool }}
99
+
100
+ - name : Download pip package artifact
101
+ uses : actions/download-artifact@v3
102
+ with :
103
+ name : pip_dist
104
+
105
+ - name : Install the package with pip from artifacts
106
+ run : pip install *.whl
107
+
108
+ - name : Install test requirements
109
+ run : pip install -r requirements-test.txt
110
+
111
+ - name : Run tests
112
+ run : python -m unittest discover -v
113
+ env :
114
+ TEST_PURE_INSTALL : true
115
+
116
+ run_tests_pip_package_install_windows :
117
+ needs : pack_pip
118
+
119
+ # We want to run on external PRs, but not on our own internal
120
+ # PRs as they'll be run by the push to the branch.
121
+ #
122
+ # The main trick is described here:
123
+ # https://github.com/Dart-Code/Dart-Code/pull/2375
124
+ if : (github.event_name == 'push') ||
125
+ (github.event_name == 'pull_request' &&
126
+ github.event.pull_request.head.repo.full_name != github.repository)
127
+
128
+ runs-on : windows-2022
129
+
130
+ strategy :
131
+ fail-fast : false
132
+
133
+ matrix :
134
+ # Use reduced test matrix cause Windows pipelines are long.
135
+ tarantool :
136
+ - ' 2.10.0.g0a5ce0b9c-1'
137
+ python :
138
+ - ' 3.6'
139
+ - ' 3.10'
140
+ steps :
141
+ - name : Clone the connector repo
142
+ uses : actions/checkout@v2
143
+
144
+ - name : Setup Python
145
+ uses : actions/setup-python@v2
146
+ with :
147
+ python-version : ${{ matrix.python }}
148
+
149
+ - name : Remove connector source code
150
+ run : python .github/scripts/remove_source_code.py
151
+
152
+ - name : Download pip package artifact
153
+ uses : actions/download-artifact@v3
154
+ with :
155
+ name : pip_dist
156
+
157
+ - name : Install the package with pip from artifacts
158
+ run : pip install (gci . *.whl).fullname
159
+
160
+ - name : Install test requirements
161
+ run : pip install -r requirements-test.txt
162
+
163
+ - name : Setup WSL for tarantool
164
+ uses : Vampire/setup-wsl@v1
165
+ with :
166
+ distribution : Ubuntu-20.04
167
+
168
+ - name : Install tarantool ${{ matrix.tarantool }} for WSL
169
+ shell : wsl-bash_Ubuntu-20.04 {0}
170
+ run : |
171
+ curl -L https://tarantool.io/release/2/installer.sh | bash -s
172
+ sudo apt install -y tarantool=${{ matrix.tarantool }} tarantool-dev=${{ matrix.tarantool }}
173
+
174
+ - name : Setup test tarantool instance
175
+ shell : wsl-bash_Ubuntu-20.04 {0}
176
+ run : |
177
+ rm -f ./tarantool.pid ./tarantool.log
178
+ TNT_PID=$(tarantool ./test/suites/lib/tarantool_python_ci.lua > tarantool.log 2>&1 & echo $!)
179
+ touch tarantool.pid
180
+ echo $TNT_PID > ./tarantool.pid
181
+
182
+ - name : Run tests
183
+ env :
184
+ REMOTE_TARANTOOL_HOST : localhost
185
+ REMOTE_TARANTOOL_CONSOLE_PORT : 3302
186
+ TEST_PURE_INSTALL : true
187
+ run : python -m unittest discover -v
188
+
189
+ - name : Stop test tarantool instance
190
+ if : ${{ always() }}
191
+ shell : wsl-bash_Ubuntu-20.04 {0}
192
+ run : |
193
+ cat tarantool.log || true
194
+ kill $(cat tarantool.pid) || true
0 commit comments