Skip to content

#49 Work on PostgreSQL #3

#49 Work on PostgreSQL

#49 Work on PostgreSQL #3

Workflow file for this run

# Based on
# - https://github.com/marketplace/actions/setup-go-environment
name: go-test-darwin.yaml
on: [push]
env:
LD_LIBRARY_PATH: /opt/senzing/g2/lib
POSTGRESQL_DATABASE: G2
POSTGRESQL_PASSWORD: senzing
POSTGRESQL_POSTGRES_PASSWORD: postgres
POSTGRESQL_USERNAME: senzing
SENZING_ACCEPT_EULA: I_ACCEPT_THE_SENZING_EULA
SENZING_TOOLS_DATABASE_URL: "sqlite3://na:na@/tmp/sqlite/G2C.db"
jobs:
build:
runs-on: macos-latest
strategy:
matrix:
go: ["1.20"]
name: Go ${{ matrix.go }} - darwin
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- name: Install Docker
uses: docker-practice/actions-setup-docker@master
timeout-minutes: 12
- name: PostgreSQL service
run: docker run --detach --env POSTGRESQL_DATABASE --env POSTGRESQL_PASSWORD --env POSTGRESQL_POSTGRES_PASSWORD --env POSTGRESQL_USERNAME --expose 5432:5432 bitnami/postgresql:latest
- name: Sleep 15 seconds
run: sleep 15
- run: mkdir /tmp/sqlite
- run: touch /tmp/sqlite/G2C.db
- name: Run go test
run: go test -v -p 1 ./...