Skip to content

#161 Enable macOS/Windows testing #194

#161 Enable macOS/Windows testing

#161 Enable macOS/Windows testing #194

Workflow file for this run

name: Go test darwin
on: [pull_request, workflow_dispatch]
env:
SENZING_LOG_LEVEL: TRACE
permissions:
contents: read
jobs:
go-test-darwin:
name: "Go test with OS: ${{ matrix.os }}; Go: ${{ matrix.go }}"
runs-on: ${{ matrix.os }}
strategy:
matrix:
go: ["1.21"]
os: [macos-latest]
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 Docker
# uses: docker-practice/actions-setup-docker@v1
# timeout-minutes: 12
- name: Setup docker (missing on MacOS)
run: brew install docker
- name: Run gRPC service
run: docker run --detach --env SENZING_TOOLS_DATABASE_URL=sqlite3://na:na@/tmp/sqlite/G2C.db --env SENZING_TOOLS_ENABLE_ALL=true --publish 8261:8261 senzing/serve-grpc:latest
- name: Run go test
run: go test -json -v -p 1 -coverprofile=./cover.out -covermode=atomic -coverpkg=./... ./... 2>&1 | tee /tmp/gotest.log | gotestfmt
- 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: /tmp/gotest.log
if-no-files-found: error
coverage:
name: Coverage
needs: go-test-darwin
uses: senzing-factory/build-resources/.github/workflows/go-coverage.yaml@v2
with:
coverage-config: ./.github/coverage/testcoverage.yaml