Skip to content

ci: fix failed to initialize container mcmoe/mssqldocker:latest #103

ci: fix failed to initialize container mcmoe/mssqldocker:latest

ci: fix failed to initialize container mcmoe/mssqldocker:latest #103

Workflow file for this run

name: tests
on:
push:
pull_request:
permissions:
contents: read
jobs:
run-tests:
strategy:
matrix:
go: ['1.21', '1.20', '1.19']
platform: [ubuntu-latest]
runs-on: ubuntu-latest
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-tools18/bin/sqlcmd -C -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@v4
with:
go-version: ${{ matrix.go }}
- name: Check out code into the Go module directory
uses: actions/checkout@v4
# Run build of the application
- name: Run build
run: go build .
- name: Run tests
run: go test -race -count=1 -v ./...