M0: repo scaffolding, CI pipelines, and Go skeleton #1

Merged
bvandeusen merged 262 commits from dev into main 2026-04-18 18:00:46 -04:00
bvandeusen commented 2026-04-18 17:59:00 -04:00 (Migrated from git.fabledsword.com)

Closes Fable milestone M0 (project 12, milestone 25). Lands the initial repo setup so that every subsequent server PR can rely on lint + tests gating in CI and a known go run ./cmd/minstrel baseline.

Summary

  • Repo skeleton — spec docs under docs/, README pointing at server-first workflow, MIT license, Go .gitignore.
  • CI pipelines.forgejo/workflows/test.yml runs go vet + golangci-lint run + go test -short -race ./... on push to dev and PRs into main against the go-ci runner label. .forgejo/workflows/release.yml builds the Docker image and pushes :main on merges to main and :v* on version tags. No Postgres service in CI — integration tests gate on testing.Short() and run locally via docker-compose.
  • Go skeleton (Fable task 282) — module git.fabledsword.com/bvandeusen/minstrel, cmd/minstrel/main.go with flag/env config, slog init, chi router + /healthz, graceful shutdown. internal/config loads YAML with SMARTMUSIC_* env overlay per spec §10. internal/db embeds a placeholder migration and stubs Migrate() — goose lands in M2 alongside Postgres work to keep the Go toolchain on 1.23.
  • Runtime image — multi-stage Dockerfile (golang:1.23-bookwormdebian:bookworm-slim + ffmpeg per spec §3), non-root user.
  • Local devdocker-compose.yml brings up Postgres 16 for integration tests without complicating CI.
  • Lint config.golangci.yml enables errcheck, govet, ineffassign, staticcheck, unused, gofmt, goimports, revive (var-naming + unused-parameter + early-return only; exported deliberately off so we don't have to boilerplate doc comments on every exported symbol).

Test plan

  • go build ./... clean locally on Go 1.26 and inside the go-ci runner image (Go 1.23.12)
  • go vet ./... clean
  • golangci-lint run ./... clean inside runner image
  • go test -short -race ./... — config, db (stub), server packages all green
  • Dev-branch CI run #23 (id 411) passed end-to-end
  • go run ./cmd/minstrel starts on :4533 (override via SMARTMUSIC_SERVER_ADDRESS), logs startup, returns 200 {"status":"ok"} on /healthz, shuts down cleanly on SIGINT
  • Post-merge: release workflow produces git.fabledsword.com/bvandeusen/minstrel:main (closes Fable task 281)
  • Post-merge: PR CI lane (pull_request trigger) appears green against main

Follow-ups (not in this PR)

  • M1: Subsonic baseline endpoints (Fable milestone 26)
  • M2: real goose migration runner + Postgres schema (will re-add goose to go.mod and may bump go directive to 1.24/1.25)
Closes Fable milestone M0 (project 12, milestone 25). Lands the initial repo setup so that every subsequent server PR can rely on lint + tests gating in CI and a known `go run ./cmd/minstrel` baseline. ## Summary - **Repo skeleton** — spec docs under `docs/`, README pointing at server-first workflow, MIT license, Go `.gitignore`. - **CI pipelines** — `.forgejo/workflows/test.yml` runs `go vet` + `golangci-lint run` + `go test -short -race ./...` on push to `dev` and PRs into `main` against the `go-ci` runner label. `.forgejo/workflows/release.yml` builds the Docker image and pushes `:main` on merges to `main` and `:v*` on version tags. No Postgres service in CI — integration tests gate on `testing.Short()` and run locally via `docker-compose`. - **Go skeleton** (Fable task 282) — module `git.fabledsword.com/bvandeusen/minstrel`, `cmd/minstrel/main.go` with flag/env config, slog init, chi router + `/healthz`, graceful shutdown. `internal/config` loads YAML with `SMARTMUSIC_*` env overlay per spec §10. `internal/db` embeds a placeholder migration and stubs `Migrate()` — goose lands in M2 alongside Postgres work to keep the Go toolchain on 1.23. - **Runtime image** — multi-stage `Dockerfile` (`golang:1.23-bookworm` → `debian:bookworm-slim` + ffmpeg per spec §3), non-root user. - **Local dev** — `docker-compose.yml` brings up Postgres 16 for integration tests without complicating CI. - **Lint config** — `.golangci.yml` enables errcheck, govet, ineffassign, staticcheck, unused, gofmt, goimports, revive (var-naming + unused-parameter + early-return only; `exported` deliberately off so we don't have to boilerplate doc comments on every exported symbol). ## Test plan - [x] `go build ./...` clean locally on Go 1.26 and inside the `go-ci` runner image (Go 1.23.12) - [x] `go vet ./...` clean - [x] `golangci-lint run ./...` clean inside runner image - [x] `go test -short -race ./...` — config, db (stub), server packages all green - [x] Dev-branch CI run #23 (id 411) passed end-to-end - [x] `go run ./cmd/minstrel` starts on `:4533` (override via `SMARTMUSIC_SERVER_ADDRESS`), logs startup, returns `200 {"status":"ok"}` on `/healthz`, shuts down cleanly on SIGINT - [ ] Post-merge: release workflow produces `git.fabledsword.com/bvandeusen/minstrel:main` (closes Fable task 281) - [ ] Post-merge: PR CI lane (`pull_request` trigger) appears green against `main` ## Follow-ups (not in this PR) - M1: Subsonic baseline endpoints (Fable milestone 26) - M2: real goose migration runner + Postgres schema (will re-add goose to go.mod and may bump go directive to 1.24/1.25)
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bvandeusen/minstrel#1