-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (48 loc) · 1.82 KB
/
go-test-darwin.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Based on
# - https://github.com/marketplace/actions/setup-go-environment
name: go-test-darwin.yaml
on: [push]
env:
ACCEPT_EULA: Y
MSSQL_PID: Developer
MSSQL_SA_PASSWORD: Passw0rd
MYSQL_DATABASE: G2
MYSQL_PASSWORD: mysql
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: mysql
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:
go-test-darwin:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go: ["1.21"]
os: [macos-latest]
name: "go test with OS: ${{ matrix.os }}; Go: ${{ matrix.go }}"
steps:
- name: Checkout repository
uses: actions/checkout@v4
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 --publish 5432:5432 bitnami/postgresql:latest
- name: MsSQL service
run: docker run --detach --env ACCEPT_EULA --env MSSQL_PID --env MSSQL_SA_PASSWORD --publish 1433:1433 mcr.microsoft.com/mssql/server
- name: MySQL service
run: docker run --detach --env MYSQL_DATABASE --env MYSQL_PASSWORD --env MYSQL_ROOT_PASSWORD --env MYSQL_USER --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=6 --publish 3306:3306 bitnami/mysql
- run: mkdir /tmp/sqlite
- run: touch /tmp/sqlite/G2C.db
- name: Run go test
run: go test -v -p 1 ./...