Skip to content

Commit

Permalink
turn off sqlserver test
Browse files Browse the repository at this point in the history
  • Loading branch information
Axb12 committed Jan 14, 2025
1 parent 6b341c6 commit 2be43ed
Showing 1 changed file with 43 additions and 43 deletions.
86 changes: 43 additions & 43 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,46 +122,46 @@ jobs:
- name: Tests
run: GORM_ENABLE_CACHE=true GORM_DIALECT=postgres GORM_DSN="user=gorm password=gorm dbname=gorm host=localhost port=9920 sslmode=disable TimeZone=Asia/Shanghai" ./test.sh

sqlserver:
needs: sqlite
strategy:
matrix:
go: ['1.21']
platform: [ubuntu-latest] # can not run test in macOS and windows
runs-on: ${{ matrix.platform }}

services:
mssql:
image: mcmoe/mssqldocker:latest
env:
ACCEPT_EULA: Y
SA_PASSWORD: LoremIpsum86
MSSQL_DB: gorm
MSSQL_USER: gorm
MSSQL_PASSWORD: LoremIpsum86
ports:
- 9930:1433
options: >-
--health-cmd="/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P LoremIpsum86 -l 30 -Q \"SELECT 1\" || exit 1"
--health-start-period 10s
--health-interval 10s
--health-timeout 5s
--health-retries 10
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: go mod pakcage cache
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('go.mod') }}

- name: Tests
run: GORM_ENABLE_CACHE=true GORM_DIALECT=sqlserver GORM_DSN="sqlserver://gorm:LoremIpsum86@localhost:9930?database=gorm" ./test.sh
# sqlserver:
# needs: sqlite
# strategy:
# matrix:
# go: ['1.21']
# platform: [ubuntu-latest] # can not run test in macOS and windows
# runs-on: ${{ matrix.platform }}

# services:
# mssql:
# image: mcmoe/mssqldocker:latest
# env:
# ACCEPT_EULA: Y
# SA_PASSWORD: LoremIpsum86
# MSSQL_DB: gorm
# MSSQL_USER: gorm
# MSSQL_PASSWORD: LoremIpsum86
# ports:
# - 9930:1433
# options: >-
# --health-cmd="/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P LoremIpsum86 -l 30 -Q \"SELECT 1\" || exit 1"
# --health-start-period 10s
# --health-interval 10s
# --health-timeout 5s
# --health-retries 10

# steps:
# - name: Set up Go 1.x
# uses: actions/setup-go@v2
# with:
# go-version: ${{ matrix.go }}

# - name: Check out code into the Go module directory
# uses: actions/checkout@v2

# - name: go mod pakcage cache
# uses: actions/cache@v2
# with:
# path: ~/go/pkg/mod
# key: ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('go.mod') }}

# - name: Tests
# run: GORM_ENABLE_CACHE=true GORM_DIALECT=sqlserver GORM_DSN="sqlserver://gorm:LoremIpsum86@localhost:9930?database=gorm" ./test.sh

0 comments on commit 2be43ed

Please sign in to comment.