-
-
Notifications
You must be signed in to change notification settings - Fork 8
67 lines (57 loc) · 1.72 KB
/
tests.yml
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
name: tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
dameng:
strategy:
matrix:
db-version: ['danilaworker/damengdb:8.1.2']
go-version: ['1.18.10', '1.19.13', '1.20.14', '1.21.x', '1.22.x']
platform: [ubuntu-latest] # can not run in macOS and Windows OS
runs-on: ${{ matrix.platform }}
services:
dameng:
image: ${{ matrix.db-version }}
env:
PAGE_SIZE: 16
EXTENT_SIZE: 32
BLANK_PAD_MODE: 1
LOG_SIZE: 1024
UNICODE_FLAG: 1
LENGTH_IN_CHAR: 1
LD_LIBRARY_PATH: /opt/dmdbms/bin
INSTANCE_NAME: dm8_test
ports:
- 30236:5236
volumes:
- /data/dm8_test:/opt/dmdbms/data
options: >-
--restart=always
--privileged=true
steps:
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
cache: false
- name: Display Go version
run: go version
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: go mod tidy
run: go mod tidy
- name: Check DM8 port
run: |
if ss -tln | grep -q ":30236 "; then
echo "DM8 服务端口号正常!"
else
echo "DM8 服务端口号异常!"
fi
go run github.com/cloverstd/tcping@latest 127.0.0.1:30236
- name: Tests 386
run: GOARCH=386 DM_HOST=127.0.0.1 DM_PORT=30236 DM_PASSWORD=SYSDBA001 WAIT_MIN=1 go test -timeout 20m -v ./...
- name: Tests amd64
run: GOARCH=amd64 DM_HOST=127.0.0.1 DM_PORT=30236 DM_PASSWORD=SYSDBA001 go test -timeout 20m -v ./...