Skip to content

feat: PostgreSQL support #1

feat: PostgreSQL support

feat: PostgreSQL support #1

Workflow file for this run

name: Backend testing with Postgres
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize]
jobs:
test-postgres:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:17.2
ports:
- 5432:5432
env:
POSTGRES_DB: albyhub
POSTGRES_USER: alby
POSTGRES_PASSWORD: albytest123
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
name: Check out code
- name: Setup GoLang
uses: actions/setup-go@v5
with:
go-version-file: "./go.mod"
- name: Get dependencies
run: go get -v -t -d ./...
- name: Run tests
env:
TEST_DATABASE_URI: "postgresql://alby:albytest123@localhost:5432/albyhub"
run: mkdir frontend/dist && touch frontend/dist/tmp && go test ./...