-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: liutianqi <[email protected]>
- Loading branch information
Showing
1 changed file
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
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', '1.19', '1.20', '1.21.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@v4 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
- 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 | ||
run: DM_HOST=127.0.0.1 DM_PORT=30236 DM_PASSWORD=SYSDBA001 go test -v ./... |