mirror of
https://github.com/abhinavxd/libredesk.git
synced 2026-10-27 06:47:01 +00:00
41 lines
883 B
YAML
41 lines
883 B
YAML
name: Go
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
|
|
services:
|
|
db:
|
|
image: mirror.gcr.io/library/postgres:17-alpine
|
|
ports:
|
|
- 5432:5432
|
|
env:
|
|
POSTGRES_USER: libredesk
|
|
POSTGRES_PASSWORD: libredesk
|
|
POSTGRES_DB: libredesk
|
|
options: >-
|
|
--health-cmd="pg_isready -U libredesk"
|
|
--health-interval=10s
|
|
--health-timeout=5s
|
|
--health-retries=5
|
|
|
|
env:
|
|
LIBREDESK_TEST_DB_DSN: "postgres://libredesk:libredesk@127.0.0.1:5432/libredesk?sslmode=disable&connect_timeout=3"
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: "1.25.0"
|
|
|
|
- name: Install dependencies
|
|
run: go get -v ./...
|
|
|
|
- name: Run tests
|
|
run: make test
|