Skip to content

Bump senzing-factory/github-action-install-senzing-api from 3 to 4 #159

Bump senzing-factory/github-action-install-senzing-api from 3 to 4

Bump senzing-factory/github-action-install-senzing-api from 3 to 4 #159

Workflow file for this run

name: Go test darwin
on: [pull_request, workflow_dispatch]
env:
CGO_LDFLAGS: "-Wl,-no_warn_duplicate_libraries"
DYLD_LIBRARY_PATH: /opt/senzing/er/lib:/opt/senzing/er/lib/macos
LD_LIBRARY_PATH: /opt/senzing/er/lib:/opt/senzing/er/lib/macos
SENZING_TOOLS_DATABASE_URL: sqlite3://na:na@nowhere/tmp/sqlite/G2C.db
permissions:
contents: read
jobs:
go-test-darwin:
name: "Go test with Senzing: ${{ matrix.senzingapi-version }}; OS: ${{ matrix.os }}; Go: ${{ matrix.go }}"
runs-on: ${{ matrix.os }}
strategy:
matrix:
go: ["1.21"]
os: [macos-latest]
senzingapi-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 API
uses: senzing-factory/github-action-install-senzing-api@v4
with:
senzingapi-version: ${{ matrix.senzingapi-version }}
- name: Copy /etc files
run: sudo mkdir -p /opt/senzing/er/etc && sudo cp testdata/senzing-license/g2.lic /opt/senzing/er/etc/g2.lic
- name: Copy test database files
run: mkdir -p /tmp/sqlite && cp testdata/sqlite/G2C.db /tmp/sqlite/
- name: Run go test
run: go test -exec /Users/runner/work/load/load/bin/macos_exec_dyld.sh -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-darwin.yaml