From ba02fd17ae016c9bf43dfe09b2ba66a4c66fbbfe Mon Sep 17 00:00:00 2001 From: docktermj Date: Mon, 22 Jul 2024 17:41:00 -0400 Subject: [PATCH] Fixed lint issue --- .github/workflows/go-test-darwin.yaml | 61 ++++++++------------------- 1 file changed, 18 insertions(+), 43 deletions(-) diff --git a/.github/workflows/go-test-darwin.yaml b/.github/workflows/go-test-darwin.yaml index d9dc31e..de701e8 100644 --- a/.github/workflows/go-test-darwin.yaml +++ b/.github/workflows/go-test-darwin.yaml @@ -1,72 +1,47 @@ -name: Go test darwin +name: go test darwin -on: [pull_request, workflow_dispatch] +on: [push] env: DYLD_LIBRARY_PATH: /opt/senzing/g2/lib:/opt/senzing/g2/lib/macos LD_LIBRARY_PATH: /opt/senzing/g2/lib:/opt/senzing/g2/lib/macos - SENZING_TOOLS_DATABASE_URL: "sqlite3://na:na@nowhere/tmp/sqlite/G2C.db" + SENZING_TOOLS_DATABASE_URL: 'sqlite3://na:na@/tmp/sqlite/G2C.db' + SENZING_TOOLS_ENABLE_ALL: true permissions: contents: read jobs: go-test-darwin: - name: "Go test with Senzing: ${{ matrix.senzingapi-version }}; OS: ${{ matrix.os }}; Go: ${{ matrix.go }}" + 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-13] - senzingapi-version: [staging-v4] + go: ['1.21'] + os: [macos-latest] + senzingapi-version: [production-v3] steps: - - name: Checkout repository + - name: checkout repository uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Setup go + - 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@v3 + - name: install Senzing API + uses: Senzing/github-action-install-senzing-api@v3 with: senzingapi-version: ${{ matrix.senzingapi-version }} - - name: Copy /etc files - run: sudo mkdir -p /opt/senzing/g2/etc && sudo cp testdata/senzing-license/g2.lic /opt/senzing/g2/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/demo-quickstart/demo-quickstart/bin/macos_exec_dyld.sh -json -v -p 1 -coverprofile=./cover.out -covermode=atomic -coverpkg=./... ./... 2>&1 | tee /tmp/gotest.log | gotestfmt + - name: copy /etc files + run: sudo cp testdata/senzing-license/g2.lic /opt/senzing/g2/etc/g2.lic - - 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 + - name: copy test database files + run: mkdir /tmp/sqlite && cp testdata/sqlite/G2C.db /tmp/sqlite/G2C.db - 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 + - name: run go test + run: go test -exec /Users/runner/work/demo-quickstart/demo-quickstart/bin/macos_exec_dyld.sh -v -p 1 ./...