Skip to content

Add Postgres Support #145

Add Postgres Support

Add Postgres Support #145

Workflow file for this run

name: Main
on:
workflow_dispatch:
pull_request:
push:
branches:
- master
env:
CGO_ENABLED: 1
jobs:
test-linux:
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
matrix:
go-version: [ '1.21', '1.22' ]
services:
postgres:
image: postgres
env:
POSTGRES_USER: walletd_test
POSTGRES_PASSWORD: walletd_test
POSTGRES_DB: walletd_test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Configure git
run: git config --global core.autocrlf false # required on Windows
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Test
uses: ./.github/actions/test
with:
go-test-tags: 'test_pg'
- name: Build
run: go build -o bin/ ./cmd/walletd
test-other:
runs-on: ${{ matrix.os }}
permissions:
contents: read
strategy:
matrix:
os: [ macos-latest, windows-latest ]
go-version: [ '1.21', '1.22' ]
steps:
- name: Configure git
run: git config --global core.autocrlf false # required on Windows
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Test
uses: ./.github/actions/test
with:
go-test-tags: 'netgo'
- name: Build
run: go build -o bin/ ./cmd/walletd