#282 Debug - 20 #68
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 linux - postgres | |
on: [push] | |
env: | |
SENZING_LOG_LEVEL: TRACE | |
SENZING_TOOLS_DATABASE_URL: "postgresql://postgres:postgres@localhost:5432/G2/?sslmode=disable" | |
permissions: | |
contents: read | |
jobs: | |
go-test-linux: | |
name: "Go test with Senzing: ${{ matrix.senzingsdk-version }}; OS: ${{ matrix.os }}; Go: ${{ matrix.go }} - postgres" | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
go: ["1.21"] | |
os: [ubuntu-latest] | |
senzingsdk-version: [staging-v4] | |
services: | |
postgres: | |
# https://hub.docker.com/_/postgres | |
env: | |
POSTGRES_DB: G2 | |
POSTGRES_PASSWORD: postgres | |
image: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
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: Copy rootfs files | |
run: sudo cp --verbose --recursive rootfs/* / | |
- name: Install Senzing SDK | |
uses: senzing-factory/github-action-install-senzing-sdk@v3 | |
with: | |
packages-to-install: "senzingsdk-runtime senzingsdk-setup" | |
senzingsdk-repository-package: ${{ secrets.SENZING_APT_BETA_STAGING_REPOSITORY_PACKAGE }} | |
senzingsdk-repository-path: ${{ secrets.SENZING_APT_BETA_STAGING_REPOSITORY_URL }} | |
- name: Run go test | |
run: | | |
export SENZING_PATH="/opt/senzing" | |
export LD_LIBRARY_PATH="${SENZING_PATH}/er/lib" | |
go test -json -v -p 1 ./... 2>&1 | tee /tmp/gotest.log | gotestfmt |