Skip to content

Commit 1cbf6ea

Browse files
committed
ci(tests): replace tidb action and update Go matrix
1 parent 4380dd6 commit 1cbf6ea

File tree

1 file changed

+24
-13
lines changed

1 file changed

+24
-13
lines changed

.github/workflows/tests.yml

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
sqlite:
1717
strategy:
1818
matrix:
19-
go: ['1.24', '1.25']
19+
go: ['1.25', 'stable']
2020
platform: [ubuntu-latest] # can not run in windows OS
2121
runs-on: ${{ matrix.platform }}
2222

@@ -42,7 +42,7 @@ jobs:
4242
strategy:
4343
matrix:
4444
dbversion: ['mysql:9', 'mysql:8', 'mysql:5.7']
45-
go: ['1.24', '1.25']
45+
go: ['1.25', 'stable']
4646
platform: [ubuntu-latest]
4747
runs-on: ${{ matrix.platform }}
4848

@@ -85,7 +85,7 @@ jobs:
8585
strategy:
8686
matrix:
8787
dbversion: [ 'mariadb:latest' ]
88-
go: ['1.24', '1.25']
88+
go: ['1.25', 'stable']
8989
platform: [ ubuntu-latest ]
9090
runs-on: ${{ matrix.platform }}
9191

@@ -128,7 +128,7 @@ jobs:
128128
strategy:
129129
matrix:
130130
dbversion: ['postgres:latest', 'postgres:15', 'postgres:14', 'postgres:13']
131-
go: ['1.24', '1.25']
131+
go: ['1.25', 'stable']
132132
platform: [ubuntu-latest] # can not run in macOS and Windows
133133
runs-on: ${{ matrix.platform }}
134134

@@ -170,7 +170,7 @@ jobs:
170170
sqlserver:
171171
strategy:
172172
matrix:
173-
go: ['1.24', '1.25']
173+
go: ['1.25', 'stable']
174174
platform: [ubuntu-latest] # can not run test in macOS and windows
175175
runs-on: ${{ matrix.platform }}
176176

@@ -212,17 +212,18 @@ jobs:
212212
strategy:
213213
matrix:
214214
dbversion: [ 'v6.5.0' ]
215-
go: ['1.24', '1.25']
215+
go: ['1.25', 'stable']
216216
platform: [ ubuntu-latest ]
217217
runs-on: ${{ matrix.platform }}
218218

219-
steps:
220-
- name: Setup TiDB
221-
uses: Icemap/tidb-action@main
222-
with:
223-
port: 9940
224-
version: ${{matrix.dbversion}}
219+
services:
220+
tidb:
221+
image: pingcap/tidb:${{ matrix.dbversion }}
222+
ports:
223+
- 9940:4000
224+
- 10080:10080
225225

226+
steps:
226227
- name: Set up Go 1.x
227228
uses: actions/setup-go@v4
228229
with:
@@ -231,6 +232,16 @@ jobs:
231232
- name: Check out code into the Go module directory
232233
uses: actions/checkout@v4
233234

235+
- name: Wait for TiDB
236+
run: |
237+
for i in $(seq 1 60); do
238+
if curl -sf http://127.0.0.1:10080/status >/dev/null; then
239+
exit 0
240+
fi
241+
sleep 2
242+
done
243+
curl -sf http://127.0.0.1:10080/status
244+
234245
235246
- name: go mod package cache
236247
uses: actions/cache@v4
@@ -245,7 +256,7 @@ jobs:
245256
strategy:
246257
matrix:
247258
dbversion: ['opengauss/opengauss:7.0.0-RC1.B023']
248-
go: ['1.24', '1.25']
259+
go: ['1.25', 'stable']
249260
platform: [ubuntu-latest] # can not run in macOS and Windows
250261
runs-on: ${{ matrix.platform }}
251262

0 commit comments

Comments
 (0)