Browse Source

adapter helper and github action

pull/467/head
徐云金YunjinXu 2 years ago
parent
commit
07b3d70d4f
  1. 10
      .github/workflows/tests.yml
  2. 9
      helper/compose.store.yml
  3. 2
      helper/test-cover.sh

10
.github/workflows/tests.yml

@ -45,6 +45,16 @@ jobs:
- /etc/timezone:/etc/timezone:ro
ports:
- 27017:27017
sqlserver:
image: mcr.microsoft.com/mssql/server:2019-latest
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
env:
ACCEPT_EULA: Y
MSSQL_SA_PASSWORD: p@ssw0rd
ports:
- '1433:1433'
steps:
- name: Set up Go 1.19
uses: actions/setup-go@v2

9
helper/compose.store.yml

@ -36,3 +36,12 @@ services:
- /etc/localtime:/etc/localtime:ro
ports:
- '27017:27017'
sqlserver2019:
image: mcr.microsoft.com/mssql/server:2019-latest
volumes:
- /etc/localtime:/etc/localtime:ro
ports:
- 1433:1433
environment:
- ACCEPT_EULA=Y
- MSSQL_SA_PASSWORD=p@ssw0rd

2
helper/test-cover.sh

@ -1,7 +1,7 @@
set -x
export DTM_DEBUG=1
echo "mode: count" > coverage.txt
for store in redis boltdb mysql postgres; do
for store in redis boltdb mysql postgres sqlserver; do
TEST_STORE=$store go test -failfast -covermode count -coverprofile=profile.out -coverpkg=github.com/dtm-labs/dtm/client/dtmcli,github.com/dtm-labs/dtm/client/dtmcli/dtmimp,github.com/dtm-labs/logger,github.com/dtm-labs/dtm/client/dtmgrpc,github.com/dtm-labs/dtm/client/workflow,github.com/dtm-labs/dtm/client/dtmgrpc/dtmgimp,github.com/dtm-labs/dtm/dtmsvr,dtmsvr/config,github.com/dtm-labs/dtm/dtmsvr/storage,github.com/dtm-labs/dtm/dtmsvr/storage/boltdb,github.com/dtm-labs/dtm/dtmsvr/storage/redis,github.com/dtm-labs/dtm/dtmsvr/storage/registry,github.com/dtm-labs/dtm/dtmsvr/storage/sql,github.com/dtm-labs/dtm/dtmutil -gcflags=-l ./... || exit 1
echo "TEST_STORE=$store finished"
if [ -f profile.out ]; then

Loading…
Cancel
Save