#282 Add MS SQL support #366
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
name: Go test windows | |
on: [pull_request, workflow_dispatch] | |
env: | |
SENZING_LOG_LEVEL: TRACE | |
SENZING_TOOLS_DATABASE_URL: "sqlite3://na:na@nowhere/C:\\Temp\\sqlite\\G2C.db" | |
permissions: | |
contents: read | |
jobs: | |
go-test-windows: | |
name: "Go test with Senzing: ${{ matrix.senzingsdk-version }}; OS: windows-latest; Go: ${{ matrix.go }}" | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
go: ["1.21"] | |
senzingsdk-version: [staging-v4] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Set up gotestfmt | |
uses: gotesttools/gotestfmt-action@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install Senzing SDK | |
uses: senzing-factory/github-action-install-senzing-sdk@v3 | |
with: | |
senzingsdk-repository-path: ${{ secrets.SENZING_WIN_BETA_REPOSITORY }} | |
- name: Add to "Path" environment variable | |
run: Add-Content "$env:GITHUB_PATH" "$Env:USERPROFILE\Senzing\er\lib" | |
- name: Create empty database file | |
run: | | |
mkdir "C:\Temp\sqlite" | |
# New-Item -Path "C:\Temp\sqlite\G2C.db" -ItemType File | |
- name: Run go test | |
run: | | |
$Env:SENZING_PATH = "$Env:USERPROFILE\Senzing" | |
$Env:CGO_CFLAGS = "-g -I$Env:SENZING_PATH\er\sdk\c" | |
$Env:CGO_LDFLAGS = "-L$Env:SENZING_PATH\er\lib -lSz" | |
go test -json -v -p 1 -coverprofile=cover -covermode=atomic -coverpkg=./... ./... 2>&1 | tee "C:\Temp\gotest.log" | gotestfmt | |
cp cover cover.out | |
- name: Store coverage file | |
uses: actions/upload-artifact@v4 | |
with: | |
name: cover.out | |
path: cover.out | |
- name: Upload test log | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: test-log | |
path: "C:\\Temp\\gotest.log" | |
if-no-files-found: error | |
coverage: | |
name: Coverage | |
needs: go-test-windows | |
uses: senzing-factory/build-resources/.github/workflows/go-coverage.yaml@v2 | |
with: | |
coverage-config: ./.github/coverage/testcoverage-windows.yaml |