extended aurora scenarios + payment operation amounts
This commit is contained in:
104
Makefile
104
Makefile
@@ -1,12 +1,48 @@
|
||||
# Sendico Development Environment - Makefile
|
||||
# Docker Compose + Makefile build system
|
||||
|
||||
.PHONY: help init build up down restart logs rebuild clean vault-init proto generate generate-api generate-frontend update update-api update-frontend test test-api test-frontend lint-api backend-up backend-down backend-rebuild
|
||||
.PHONY: \
|
||||
help \
|
||||
init \
|
||||
build \
|
||||
build-infra \
|
||||
build-core \
|
||||
build-fx \
|
||||
build-payments \
|
||||
build-gateways \
|
||||
build-backend \
|
||||
build-frontend \
|
||||
up \
|
||||
down \
|
||||
restart \
|
||||
infra-up \
|
||||
services-up \
|
||||
backend-up \
|
||||
backend-down \
|
||||
backend-rebuild \
|
||||
status \
|
||||
list-services \
|
||||
logs \
|
||||
rebuild \
|
||||
clean \
|
||||
health \
|
||||
vault-init \
|
||||
proto \
|
||||
generate \
|
||||
generate-backend \
|
||||
generate-frontend \
|
||||
update \
|
||||
update-backend \
|
||||
update-frontend \
|
||||
test \
|
||||
test-backend \
|
||||
test-frontend \
|
||||
lint-backend
|
||||
|
||||
COMPOSE := docker compose -f docker-compose.dev.yml --env-file .env.dev
|
||||
SERVICE ?=
|
||||
API_GOCACHE ?= $(CURDIR)/.gocache
|
||||
API_GOLANGCI_LINT_CACHE ?= $(CURDIR)/.golangci-cache
|
||||
BACKEND_GOCACHE ?= $(CURDIR)/.gocache
|
||||
BACKEND_GOLANGCI_LINT_CACHE ?= $(CURDIR)/.golangci-cache
|
||||
BACKEND_SERVICES := \
|
||||
dev-discovery \
|
||||
dev-fx-oracle \
|
||||
@@ -47,8 +83,8 @@ help:
|
||||
@echo " make down Stop all services"
|
||||
@echo " make restart Restart all services"
|
||||
@echo " make status Show service status"
|
||||
@echo " make logs [SERVICE=x] View logs (all or specific service)"
|
||||
@echo " make rebuild SERVICE=x Rebuild specific service"
|
||||
@echo " make logs [SERVICE=dev-ledger] View logs (all or specific service)"
|
||||
@echo " make rebuild SERVICE=dev-ledger Rebuild specific service"
|
||||
@echo " make clean Remove all containers and volumes"
|
||||
@echo ""
|
||||
@echo "$(YELLOW)Selective Operations:$(NC)"
|
||||
@@ -62,23 +98,23 @@ help:
|
||||
@echo "$(YELLOW)Build Groups:$(NC)"
|
||||
@echo " make build-core Build core services (discovery, ledger, fees, documents)"
|
||||
@echo " make build-fx Build FX services (oracle, ingestor)"
|
||||
@echo " make build-payments Build payment orchestrator"
|
||||
@echo " make build-payments Build payment services (orchestrator, quotation, methods)"
|
||||
@echo " make build-gateways Build gateway services (chain, tron, aurora, chsettle)"
|
||||
@echo " make build-api Build API services (notification, callbacks, bff)"
|
||||
@echo " make build-backend Build backend edge services (notification, callbacks, bff)"
|
||||
@echo " make build-frontend Build Flutter web frontend"
|
||||
@echo ""
|
||||
@echo "$(YELLOW)Development:$(NC)"
|
||||
@echo " make proto Generate protobuf code"
|
||||
@echo " make generate Generate all code (protobuf + Flutter)"
|
||||
@echo " make generate-api Generate protobuf code only"
|
||||
@echo " make generate-backend Generate protobuf code only"
|
||||
@echo " make generate-frontend Generate Flutter code only"
|
||||
@echo " make update Update all dependencies (Go + Flutter)"
|
||||
@echo " make update-api Update Go dependencies only"
|
||||
@echo " make update-backend Update Go dependencies only"
|
||||
@echo " make update-frontend Update Flutter dependencies only"
|
||||
@echo " make test Run all tests (API + frontend)"
|
||||
@echo " make test-api Run Go API tests only"
|
||||
@echo " make test Run all tests (backend + frontend)"
|
||||
@echo " make test-backend Run Go backend tests only"
|
||||
@echo " make test-frontend Run Flutter tests only"
|
||||
@echo " make lint-api Run golangci-lint across all API Go modules"
|
||||
@echo " make lint-backend Run golangci-lint across all backend Go modules"
|
||||
@echo " make health Check service health"
|
||||
@echo ""
|
||||
@echo "Examples:"
|
||||
@@ -140,7 +176,7 @@ up:
|
||||
@echo " NATS UI: http://localhost:8222"
|
||||
@echo " Vault: http://localhost:8200 (run 'make vault-init' first)"
|
||||
@echo ""
|
||||
@echo "View logs: make logs [SERVICE=name]"
|
||||
@echo "View logs: make logs [SERVICE=dev-ledger]"
|
||||
@echo "Stop: make down"
|
||||
|
||||
# Stop all services
|
||||
@@ -164,7 +200,7 @@ endif
|
||||
# Rebuild specific service
|
||||
rebuild:
|
||||
ifndef SERVICE
|
||||
$(error SERVICE is required: make rebuild SERVICE=ledger)
|
||||
$(error SERVICE is required: make rebuild SERVICE=dev-ledger)
|
||||
endif
|
||||
@echo "$(GREEN)Rebuilding $(SERVICE)...$(NC)"
|
||||
@$(COMPOSE) build $(SERVICE)
|
||||
@@ -173,13 +209,13 @@ endif
|
||||
@echo "View logs: make logs SERVICE=$(SERVICE)"
|
||||
|
||||
# Generate protobuf code (alias)
|
||||
proto: generate-api
|
||||
proto: generate-backend
|
||||
|
||||
# Generate all code
|
||||
generate: generate-api generate-frontend
|
||||
generate: generate-backend generate-frontend
|
||||
|
||||
# Generate protobuf code
|
||||
generate-api:
|
||||
# Generate backend protobuf code
|
||||
generate-backend:
|
||||
@echo "$(GREEN)Generating protobuf code...$(NC)"
|
||||
@./ci/scripts/proto/generate.sh
|
||||
@echo "$(GREEN)✅ Protobuf generation complete$(NC)"
|
||||
@@ -327,8 +363,8 @@ build-gateways:
|
||||
@echo "$(GREEN)Building gateway services...$(NC)"
|
||||
@$(COMPOSE) build dev-chain-gateway dev-tron-gateway dev-aurora-gateway dev-chsettle-gateway
|
||||
|
||||
build-api:
|
||||
@echo "$(GREEN)Building API services...$(NC)"
|
||||
build-backend:
|
||||
@echo "$(GREEN)Building backend edge services...$(NC)"
|
||||
@$(COMPOSE) build dev-notification dev-callbacks dev-bff
|
||||
|
||||
build-frontend:
|
||||
@@ -336,10 +372,10 @@ build-frontend:
|
||||
@$(COMPOSE) build dev-frontend
|
||||
|
||||
# Update all dependencies
|
||||
update: update-api update-frontend
|
||||
update: update-backend update-frontend
|
||||
|
||||
# Update Go API dependencies
|
||||
update-api:
|
||||
# Update Go backend dependencies
|
||||
update-backend:
|
||||
@echo "$(GREEN)Updating Go dependencies...$(NC)"
|
||||
@for dir in $$(find api -name go.mod -exec dirname {} \;); do \
|
||||
echo "Updating $$dir..."; \
|
||||
@@ -355,11 +391,11 @@ update-frontend:
|
||||
@echo "$(GREEN)✅ Flutter dependencies updated$(NC)"
|
||||
|
||||
# Run all tests
|
||||
test: test-api test-frontend
|
||||
test: test-backend test-frontend
|
||||
|
||||
# Run Go API tests
|
||||
test-api:
|
||||
@echo "$(GREEN)Running API tests...$(NC)"
|
||||
# Run Go backend tests
|
||||
test-backend:
|
||||
@echo "$(GREEN)Running backend tests...$(NC)"
|
||||
@failed=""; \
|
||||
for dir in $$(find api -name go.mod -exec dirname {} \;); do \
|
||||
echo "Testing $$dir..."; \
|
||||
@@ -369,7 +405,7 @@ test-api:
|
||||
echo "$(YELLOW)Failed:$$failed$(NC)"; \
|
||||
exit 1; \
|
||||
fi
|
||||
@echo "$(GREEN)✅ All API tests passed$(NC)"
|
||||
@echo "$(GREEN)✅ All backend tests passed$(NC)"
|
||||
|
||||
# Run Flutter tests
|
||||
test-frontend:
|
||||
@@ -378,17 +414,17 @@ test-frontend:
|
||||
@cd frontend/pweb && flutter test
|
||||
@echo "$(GREEN)✅ All frontend tests passed$(NC)"
|
||||
|
||||
# Run Go API linting
|
||||
lint-api:
|
||||
@echo "$(GREEN)Running API linting...$(NC)"
|
||||
@mkdir -p "$(API_GOCACHE)" "$(API_GOLANGCI_LINT_CACHE)"
|
||||
# Run Go backend linting
|
||||
lint-backend:
|
||||
@echo "$(GREEN)Running backend linting...$(NC)"
|
||||
@mkdir -p "$(BACKEND_GOCACHE)" "$(BACKEND_GOLANGCI_LINT_CACHE)"
|
||||
@failed=""; \
|
||||
for dir in $$(find api -name go.mod -exec dirname {} \;); do \
|
||||
echo "Linting $$dir..."; \
|
||||
(cd "$$dir" && GOCACHE="$(API_GOCACHE)" GOLANGCI_LINT_CACHE="$(API_GOLANGCI_LINT_CACHE)" golangci-lint run --allow-serial-runners --allow-parallel-runners ./...) || failed="$$failed $$dir"; \
|
||||
(cd "$$dir" && GOCACHE="$(BACKEND_GOCACHE)" GOLANGCI_LINT_CACHE="$(BACKEND_GOLANGCI_LINT_CACHE)" golangci-lint run --allow-serial-runners --allow-parallel-runners ./...) || failed="$$failed $$dir"; \
|
||||
done; \
|
||||
if [ -n "$$failed" ]; then \
|
||||
echo "$(YELLOW)Lint failed:$$failed$(NC)"; \
|
||||
exit 1; \
|
||||
fi
|
||||
@echo "$(GREEN)✅ All API lint checks passed$(NC)"
|
||||
@echo "$(GREEN)✅ All backend lint checks passed$(NC)"
|
||||
|
||||
Reference in New Issue
Block a user