add test suite

This commit is contained in:
2026-09-15 13:11:20 +01:00
parent 9fa410e3a1
commit 9562be5e34
16 changed files with 1233 additions and 267 deletions
+21
View File
@@ -0,0 +1,21 @@
version: "3"
tasks:
build:
desc: Build dirmd with injected semantic version (task build VERSION=v0.1.4)
deps: [vet]
preconditions:
- sh: printf '%s' '{{.VERSION}}' | grep -Eq '^v[0-9]+\.[0-9]+\.[0-9]+$'
msg: "VERSION is required and must be a semantic tag like v0.1.4 — task build VERSION=v0.1.4"
cmds:
- go build -trimpath -ldflags "-s -w -X git.flo.fo/FLO/dirmd/internal/config.Version={{.VERSION}}" -o bin/dirmd .
vet:
desc: Run go vet
cmds:
- go vet ./...
test:
desc: Run all tests
cmds:
- go test ./...