Add a fake-only end-to-end stack, Firefox journey, and bounded process cleanup for normal, failed, and interrupted runs. Refs #12 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
67 lines
2.0 KiB
Makefile
67 lines
2.0 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 test-e2e test-e2e-supervisor test-e2e-timeout 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
|
|
|
|
# Dedicated offline, disposable loopback fake stack and real Playwright browser.
|
|
test-e2e:
|
|
@exec ./backend/scripts/test-e2e.sh
|
|
|
|
test-e2e-supervisor:
|
|
python3 -E -B backend/scripts/test-e2e-supervisor.py
|
|
|
|
# Real stack + timeout regression; optional QA wrapper directory can be supplied.
|
|
test-e2e-timeout:
|
|
python3 -E -B backend/scripts/test-e2e-timeout.py $(if $(E2E_REPRO_WRAPPER),--wrapper-dir "$(E2E_REPRO_WRAPPER)",)
|
|
|
|
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
|