Skip to content

Enhance documentation across various guides to include API status upd… #7

Enhance documentation across various guides to include API status upd…

Enhance documentation across various guides to include API status upd… #7

Workflow file for this run

name: API
on:
push:
paths: ["api/**", ".github/workflows/api.yml"]
pull_request:
paths: ["api/**", ".github/workflows/api.yml"]
jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: api
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_USER: purros
POSTGRES_PASSWORD: purros
POSTGRES_DB: postgres
ports: ["5432:5432"]
options: >-
--health-cmd "pg_isready -U purros" --health-interval 5s --health-timeout 3s --health-retries 20
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: api/go.mod
cache-dependency-path: api/go.sum
- name: gofmt
run: test -z "$(gofmt -l .)" || (gofmt -l . && exit 1)
- run: go vet ./...
- name: Test
run: go test -race -count=1 ./...
env:
PURROS_TEST_DATABASE_URL: postgres://purros:purros@localhost:5432/postgres?sslmode=disable
- run: go build ./cmd/purros