-
Notifications
You must be signed in to change notification settings - Fork 14
285 lines (245 loc) · 10.1 KB
/
test_on_push.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
name: Run tests
on:
push:
pull_request:
jobs:
run-tests-ce:
if: |
github.event_name == 'push' ||
github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository
strategy:
matrix:
# We need 1.10.6 here to check that module works with
# old Tarantool versions that don't have "tuple-keydef"/"tuple-merger" support.
# We test old metrics with Tarantool 2.10 because since Tarantool 2.11.1
# it uses its own metrics package.
# We test old metrics with Cartridge 2.7.9 because since 2.8.0 it
# requires metrics 1.0.0.
tarantool-version: ["1.10.6", "1.10", "2.8", "2.10", "2.11"]
metrics-version: [""]
cartridge-version: ["2.8.0"]
external-tuple-merger-version: [""]
external-tuple-keydef-version: [""]
include:
- tarantool-version: "1.10"
metrics-version: "1.0.0"
cartridge-version: "2.8.0"
- tarantool-version: "2.7"
cartridge-version: "2.8.0"
- tarantool-version: "2.10"
metrics-version: "0.10.0"
cartridge-version: "2.7.9"
- tarantool-version: "2.11"
coveralls: true
metrics-version: "1.0.0"
cartridge-version: "2.8.0"
- tarantool-version: "2.11"
metrics-version: "1.0.0"
vshard-version: "0.1.25"
- tarantool-version: "2.11"
external-merger-version: "0.0.5"
external-keydef-version: "0.0.4"
- tarantool-version: "3.0.0"
vshard-version: "0.1.25"
- tarantool-version: "master"
vshard-version: "0.1.26"
fail-fast: false
# Can't install older versions on 22.04,
# see https://github.com/tarantool/setup-tarantool/issues/36
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@master
- name: Setup Tarantool CE (1.x, 2.x)
if: ${{ startsWith( matrix.tarantool-version, '1.' ) || startsWith( matrix.tarantool-version, '2.' ) }}
uses: tarantool/setup-tarantool@v2
with:
tarantool-version: ${{ matrix.tarantool-version }}
- name: Setup tt
run: |
curl -L https://tarantool.io/release/2/installer.sh | sudo bash
sudo apt install -y tt
tt version
- name: Cache Tarantool 3.x
if: ${{ startsWith( matrix.tarantool-version, '3.' ) }}
id: cache-v3
uses: actions/cache@v3
with:
path: "${GITHUB_WORKSPACE}/bin"
key: cache-${{ matrix.tarantool-version }}
- name: Setup Tarantool CE (3.x)
if: ${{ startsWith( matrix.tarantool-version, '3.' ) && steps.cache-latest.outputs.cache-hit != 'true' }}
run: |
tt init
tt install tarantool ${{ matrix.tarantool-version }}
- name: Get Tarantool master latest commit
if: matrix.tarantool-version == 'master'
run: |
commit_hash=$(git ls-remote https://github.com/tarantool/tarantool.git --branch master | head -c 8)
echo "LATEST_COMMIT=${commit_hash}" >> $GITHUB_ENV
shell: bash
- name: Cache Tarantool master
if: matrix.tarantool-version == 'master'
id: cache-latest
uses: actions/cache@v3
with:
path: "${GITHUB_WORKSPACE}/bin"
key: cache-latest-${{ env.LATEST_COMMIT }}
- name: Setup Tarantool CE (master)
if: matrix.tarantool-version == 'master' && steps.cache-latest.outputs.cache-hit != 'true'
run: |
tt init
tt install tarantool master
- name: Add tt Tarantool to PATH
if: ${{ startsWith( matrix.tarantool-version, '3.' ) || matrix.tarantool-version == 'master' }}
run: echo "${GITHUB_WORKSPACE}/bin" >> $GITHUB_PATH
- name: Fix luarocks in Tarantool CE 1.10.6
if: matrix.tarantool-version == '1.10.6'
run: |
sudo patch -p1 /usr/share/tarantool/luarocks/manif.lua luarocks.patch
- name: Install requirements for community
run: |
tarantool --version
./deps.sh
env:
CARTRIDGE_VERSION: ${{ matrix.cartridge-version }}
VSHARD_VERSION: ${{ matrix.vshard-version }}
- name: Install metrics
if: matrix.metrics-version != ''
run: tt rocks install metrics ${{ matrix.metrics-version }}
- name: Install external tuple-merger
if: matrix.external-tuple-merger-version != ''
run: tt rocks install tuple-merger ${{ matrix.external-tuple-merger-version }}
- name: Install external tuple-keydef
if: matrix.external-tuple-keydef-version != ''
run: tt rocks install tuple-keydef ${{ matrix.external-tuple-keydef-version }}
# This server starts and listen on 8084 port that is used for tests
- name: Stop Mono server
run: sudo kill -9 $(sudo lsof -t -i tcp:8084) || true
- run: cmake -S . -B build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run tests
if: matrix.coveralls != true # See https://github.com/actions/runner/issues/1173
run: make -C build luatest-no-coverage
- name: Run tests with coverage and send results to coveralls.io
run: make -C build coveralls
if: ${{ matrix.coveralls }}
run-perf-tests-ce:
if: |
github.event_name == 'push' ||
github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository
strategy:
matrix:
tarantool-version: ["1.10", "2.11"]
metrics-version: ["1.0.0"]
cartridge-version: ["2.8.0"]
include:
- tarantool-version: "3.0.0"
vshard-version: "0.1.25"
fail-fast: false
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@master
- name: Setup Tarantool CE (1.x, 2.x)
if: ${{ startsWith( matrix.tarantool-version, '1.' ) || startsWith( matrix.tarantool-version, '2.' ) }}
uses: tarantool/setup-tarantool@v2
with:
tarantool-version: ${{ matrix.tarantool-version }}
- name: Setup tt
run: |
curl -L https://tarantool.io/release/2/installer.sh | sudo bash
sudo apt install -y tt
tt version
- name: Cache Tarantool 3.x
if: ${{ startsWith( matrix.tarantool-version, '3.' ) }}
id: cache-v3
uses: actions/cache@v3
with:
path: "${GITHUB_WORKSPACE}/bin"
key: cache-${{ matrix.tarantool-version }}
- name: Setup Tarantool CE (3.x)
if: ${{ startsWith( matrix.tarantool-version, '3.' ) && steps.cache-latest.outputs.cache-hit != 'true' }}
run: |
tt init
tt install tarantool ${{ matrix.tarantool-version }}
- name: Get Tarantool master latest commit
if: matrix.tarantool-version == 'master'
run: |
commit_hash=$(git ls-remote https://github.com/tarantool/tarantool.git --branch master | head -c 8)
echo "LATEST_COMMIT=${commit_hash}" >> $GITHUB_ENV
shell: bash
- name: Cache Tarantool master
if: matrix.tarantool-version == 'master'
id: cache-latest
uses: actions/cache@v3
with:
path: "${GITHUB_WORKSPACE}/bin"
key: cache-latest-${{ env.LATEST_COMMIT }}
- name: Setup Tarantool CE (master)
if: matrix.tarantool-version == 'master' && steps.cache-latest.outputs.cache-hit != 'true'
run: |
tt init
tt install tarantool master
- name: Add tt Tarantool to PATH
if: ${{ startsWith( matrix.tarantool-version, '3.' ) || matrix.tarantool-version == 'master' }}
run: echo "${GITHUB_WORKSPACE}/bin" >> $GITHUB_PATH
- name: Install requirements for community
run: |
tarantool --version
./deps.sh
env:
CARTRIDGE_VERSION: ${{ matrix.cartridge-version }}
VSHARD_VERSION: ${{ matrix.vshard-version }}
- name: Install metrics
if: matrix.metrics-version != ''
run: tt rocks install metrics ${{ matrix.metrics-version }}
# This server starts and listen on 8084 port that is used for tests
- name: Stop Mono server
run: sudo kill -9 $(sudo lsof -t -i tcp:8084) || true
- run: cmake -S . -B build
- name: Run performance tests
run: make -C build performance
run-tests-ee:
if: github.event_name == 'push'
strategy:
matrix:
tarantool-version:
- folder: "1.10"
bundle: "tarantool-enterprise-sdk-1.10.15-0-r609"
- folder: "2.11"
bundle: "tarantool-enterprise-sdk-nogc64-2.11.2-0-r609.linux.x86_64"
metrics-version: ["", "1.0.0"]
cartridge-version: ["2.8.0"]
include:
- tarantool-version:
folder: "3.0"
bundle: "tarantool-enterprise-sdk-gc64-3.0.0-0-gf58f7d82a-r23.linux.x86_64"
vshard-version: "0.1.25"
fail-fast: false
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@master
- name: Install requirements for enterprise
run: |
curl -O -L https://tarantool:${{ secrets.DOWNLOAD_TOKEN }}@download.tarantool.io/enterprise/release/linux/x86_64/${{ matrix.tarantool-version.folder }}/${{ matrix.tarantool-version.bundle }}.tar.gz
tar -xzf ${{ matrix.tarantool-version.bundle }}.tar.gz
rm -f ${{ matrix.tarantool-version.bundle }}.tar.gz
sudo cp tarantool-enterprise/tarantool /usr/bin/tarantool
source tarantool-enterprise/env.sh
tarantool --version
./deps.sh
env:
CARTRIDGE_VERSION: ${{ matrix.cartridge-version }}
VSHARD_VERSION: ${{ matrix.vshard-version }}
- name: Install metrics
if: matrix.metrics-version != ''
run: |
source tarantool-enterprise/env.sh
tt init
tt rocks install metrics ${{ matrix.metrics-version }}
# This server starts and listen on 8084 port that is used for tests
- name: Stop Mono server
run: sudo kill -9 $(sudo lsof -t -i tcp:8084) || true
- run: cmake -S . -B build
- name: Run tests
run: make -C build luatest-no-coverage