Describe the delivered API, data retention, operations, and local verification commands; add a non-publishing CI workflow. Refs #10 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
56 lines
1.5 KiB
Makefile
56 lines
1.5 KiB
Makefile
COMPOSE ?= docker compose
|
|
|
|
# Les sous-make et le harness héritent des mêmes caches, sans effacer leur contenu.
|
|
# Les valeurs d'environnement ou de ligne de commande restent prioritaires.
|
|
TRADARR_GO_CACHE_ROOT := $(or $(strip $(TMPDIR)),$(strip $(IDEA_MANAGED_TMP)),/tmp/tradarr-$(shell id -u))
|
|
export GOCACHE ?= $(TRADARR_GO_CACHE_ROOT)/go-build
|
|
export GOMODCACHE ?= $(TRADARR_GO_CACHE_ROOT)/gomodcache
|
|
|
|
.PHONY: up down build logs deps dev-backend dev-frontend test-postgres lint test verify docker-build
|
|
|
|
up:
|
|
$(COMPOSE) up --build
|
|
|
|
down:
|
|
$(COMPOSE) down
|
|
|
|
build:
|
|
$(COMPOSE) build
|
|
|
|
logs:
|
|
$(COMPOSE) logs -f
|
|
|
|
# Respecter les manifests et lockfiles existants, sans les réécrire.
|
|
deps:
|
|
cd backend && go mod download
|
|
cd frontend && npm ci
|
|
|
|
dev-backend:
|
|
cd backend && go run ./cmd/server
|
|
|
|
dev-frontend:
|
|
cd frontend && npm run dev
|
|
|
|
test-postgres:
|
|
./backend/scripts/test-postgres.sh
|
|
|
|
lint:
|
|
@unformatted="$$(gofmt -l backend)"; if [ -n "$$unformatted" ]; then printf 'Go formatting required:\n%s\n' "$$unformatted"; exit 1; fi
|
|
cd backend && go vet ./...
|
|
cd frontend && npm run lint
|
|
|
|
# Le harness exécute tous les tests Go, avec PostgreSQL obligatoire.
|
|
test: test-postgres
|
|
cd frontend && npm test
|
|
|
|
# Ordre séquentiel, y compris avec make -j : installation via make deps avant.
|
|
verify:
|
|
$(MAKE) lint
|
|
$(MAKE) test
|
|
cd frontend && npm run build
|
|
|
|
# Sans Compose, secrets, démarrage de services ni exécution du récupérateur.
|
|
docker-build:
|
|
docker build -t tradarr-backend:verify ./backend
|
|
docker build -t tradarr-frontend:verify ./frontend
|