8
8
workflow_dispatch :
9
9
10
10
jobs :
11
- run-tests-ce :
12
- # We want to run on external PRs, but not on our own internal
13
- # PRs as they'll be run by the push to the branch.
14
- #
15
- # The main trick is described here:
16
- # https://github.com/Dart-Code/Dart-Code/pull/2375
17
- #
18
- # Also we want to run it always for manually triggered workflows.
11
+ run-tests-tarantool-1-10 :
19
12
if : (github.event_name == 'push') ||
20
13
(github.event_name == 'pull_request' &&
21
14
github.event.pull_request.head.repo.full_name != github.repository) ||
22
15
(github.event_name == 'workflow_dispatch')
23
-
24
- # We could replace it with ubuntu-latest after fixing the bug:
25
- # https://github.com/tarantool/setup-tarantool/issues/37
26
- runs-on : ubuntu-22.04
27
-
28
16
strategy :
29
17
fail-fast : false
30
18
matrix :
31
- golang :
32
- - ' 1.20'
33
- - ' stable'
34
- tarantool :
35
- - ' 1.10'
36
- - ' 2.8'
37
- - ' 2.10'
38
- - ' master'
19
+ golang : ['1.20', 'stable']
20
+ tarantool : ['1.10']
21
+ coveralls : [false]
22
+ fuzzing : [false]
23
+ uses : ./.github/workflows/reusable-run.yml
24
+ with :
25
+ os : ubuntu-22.04
26
+ go-version : ${{ matrix.golang }}
27
+ tarantool-version : ${{ matrix.tarantool }}
28
+ coveralls : ${{ matrix.coveralls }}
29
+ fuzzing : ${{ matrix.fuzzing }}
30
+
31
+ run-tests :
32
+ if : (github.event_name == 'push') ||
33
+ (github.event_name == 'pull_request' &&
34
+ github.event.pull_request.head.repo.full_name != github.repository) ||
35
+ (github.event_name == 'workflow_dispatch')
36
+ strategy :
37
+ fail-fast : false
38
+ matrix :
39
+ golang : ['1.20', 'stable']
40
+ tarantool : ['2.11', '3.4', 'master']
39
41
coveralls : [false]
40
42
fuzzing : [false]
41
43
include :
@@ -46,84 +48,13 @@ jobs:
46
48
fuzzing : true
47
49
golang : ' 1.20'
48
50
coveralls : false
49
-
50
- steps :
51
- - name : Clone the connector
52
- uses : actions/checkout@v3
53
-
54
- - name : Setup tt
55
- run : |
56
- curl -L https://tarantool.io/release/2/installer.sh | sudo bash
57
- sudo apt install -y tt
58
-
59
- - name : Setup tt environment
60
- run : tt init
61
-
62
- # https://github.com/tarantool/checks/issues/64
63
- - name : Install specific CMake version
64
- run : pip3 install cmake==3.15.3
65
-
66
- - name : Setup Tarantool ${{ matrix.tarantool }}
67
- if : matrix.tarantool != 'master'
68
- uses : tarantool/setup-tarantool@v2
69
- with :
70
- tarantool-version : ${{ matrix.tarantool }}
71
-
72
- - name : Get Tarantool master commit
73
- if : matrix.tarantool == 'master'
74
- run : |
75
- commit_hash=$(git ls-remote https://github.com/tarantool/tarantool.git --branch master | head -c 8)
76
- echo "LATEST_COMMIT=${commit_hash}" >> $GITHUB_ENV
77
- shell : bash
78
-
79
- - name : Cache Tarantool master
80
- if : matrix.tarantool == 'master'
81
- id : cache-latest
82
- uses : actions/cache@v3
83
- with :
84
- path : |
85
- ${{ github.workspace }}/bin
86
- ${{ github.workspace }}/include
87
- key : cache-latest-${{ env.LATEST_COMMIT }}
88
-
89
- - name : Setup Tarantool master
90
- if : matrix.tarantool == 'master' && steps.cache-latest.outputs.cache-hit != 'true'
91
- run : |
92
- sudo pip3 install cmake==3.15.3
93
- sudo tt install tarantool master
94
-
95
- - name : Add Tarantool master to PATH
96
- if : matrix.tarantool == 'master'
97
- run : echo "${GITHUB_WORKSPACE}/bin" >> $GITHUB_PATH
98
-
99
- - name : Setup golang for the connector and tests
100
- uses : actions/setup-go@v3
101
- with :
102
- go-version : ${{ matrix.golang }}
103
-
104
- - name : Install test dependencies
105
- run : make deps
106
-
107
- - name : Run regression tests
108
- run : make test
109
-
110
- - name : Run race tests
111
- run : make testrace
112
-
113
- - name : Run fuzzing tests
114
- if : ${{ matrix.fuzzing }}
115
- run : make fuzzing TAGS="go_tarantool_decimal_fuzzing"
116
-
117
- - name : Run tests, collect code coverage data and send to Coveralls
118
- if : ${{ matrix.coveralls }}
119
- env :
120
- COVERALLS_TOKEN : ${{ secrets.GITHUB_TOKEN }}
121
- run : |
122
- make coveralls
123
-
124
- - name : Check workability of benchmark tests
125
- if : matrix.golang == 'stable'
126
- run : make bench-deps bench DURATION=1x COUNT=1
51
+ uses : ./.github/workflows/reusable-run.yml
52
+ with :
53
+ os : ubuntu-24.04
54
+ go-version : ${{ matrix.golang }}
55
+ tarantool-version : ${{ matrix.tarantool }}
56
+ coveralls : ${{ matrix.coveralls }}
57
+ fuzzing : ${{ matrix.fuzzing }}
127
58
128
59
testing_mac_os :
129
60
# We want to run on external PRs, but not on our own internal
@@ -165,12 +96,12 @@ jobs:
165
96
runs-on : ${{ matrix.runs-on }}
166
97
steps :
167
98
- name : Clone the connector
168
- uses : actions/checkout@v3
99
+ uses : actions/checkout@v5
169
100
with :
170
101
path : ${{ env.SRCDIR }}
171
102
172
103
- name : Restore cache of tarantool ${{ env.T_VERSION }}
173
- uses : actions/cache@v3
104
+ uses : actions/cache@v4
174
105
id : cache
175
106
with :
176
107
path : ${{ env.T_TARDIR }}
@@ -186,7 +117,7 @@ jobs:
186
117
if : matrix.tarantool != 'brew' && steps.cache.outputs.cache-hit != 'true'
187
118
188
119
- name : Clone tarantool ${{ env.T_VERSION }}
189
- uses : actions/checkout@v3
120
+ uses : actions/checkout@v5
190
121
with :
191
122
repository : tarantool/tarantool
192
123
ref : ${{ env.T_VERSION }}
@@ -257,7 +188,7 @@ jobs:
257
188
if : matrix.tarantool != 'brew' && matrix.tarantool != 'master'
258
189
259
190
- name : Setup golang for the connector and tests
260
- uses : actions/setup-go@v3
191
+ uses : actions/setup-go@v5
261
192
with :
262
193
go-version : ${{ matrix.golang }}
263
194
0 commit comments