Add CI/CD pipeline, logging enhancements, and release management

- Create a GitHub Actions workflow for testing with Python 3.12 and 3.13.
- Update Makefile to include release management commands and pipeline checks.
- Document the CI/CD pipeline structure and usage in PIPELINE.md.
- Add structlog for structured logging and enhance logging utilities.
- Implement release management script for automated versioning and tagging.
- Modify logging configuration to support structured logging and improved formatting.
- Update dependencies in pyproject.toml and poetry.lock to include structlog.
- Enhance access logging in server and middleware to include structured data.
This commit is contained in:
Илья Глазунов
2025-09-03 00:13:21 +03:00
parent ff093b020f
commit 537b783726
16 changed files with 1054 additions and 241 deletions
+29 -1
View File
@@ -1,4 +1,4 @@
.PHONY: help install build clean test lint format run dev-install dev-deps check
.PHONY: help install build clean test lint format run dev-install dev-deps check release-patch release-minor release-major pipeline-check
PYTHON = python3
POETRY = poetry
@@ -55,6 +55,12 @@ help:
@printf " $(YELLOW)%-20s$(CYAN) %s$(NC)\n" "config-create" "Creating config.yaml"
@printf " $(YELLOW)%-20s$(CYAN) %s$(NC)\n" "watch-logs" "Last server logs"
@printf " $(YELLOW)%-20s$(CYAN) %s$(NC)\n" "init" "Project initialized for development"
@echo ""
@echo "$(YELLOW)Release Management:$(NC)"
@printf " $(YELLOW)%-20s$(CYAN) %s$(NC)\n" "release-patch" "Create patch release (x.x.X)"
@printf " $(YELLOW)%-20s$(CYAN) %s$(NC)\n" "release-minor" "Create minor release (x.X.0)"
@printf " $(YELLOW)%-20s$(CYAN) %s$(NC)\n" "release-major" "Create major release (X.0.0)"
@printf " $(YELLOW)%-20s$(CYAN) %s$(NC)\n" "pipeline-check" "Run all pipeline checks locally"
@echo "$(GREEN)╚══════════════════════════════════════════════════════════════════════════════╝$(NC)"
install:
@@ -169,4 +175,26 @@ watch-logs:
init: dev-install config-create
@echo "$(GREEN)Project initialized for development!$(NC)"
release-patch:
@echo "$(GREEN)Creating patch release...$(NC)"
@./scripts/release.sh patch
release-minor:
@echo "$(GREEN)Creating minor release...$(NC)"
@./scripts/release.sh minor
release-major:
@echo "$(GREEN)Creating major release...$(NC)"
@./scripts/release.sh major
pipeline-check:
@echo "$(GREEN)Checking pipeline locally...$(NC)"
@echo "$(YELLOW)Running lint checks...$(NC)"
@$(MAKE) lint
@echo "$(YELLOW)Running tests...$(NC)"
@$(MAKE) test
@echo "$(YELLOW)Building package...$(NC)"
@$(MAKE) build
@echo "$(GREEN)All pipeline checks passed!$(NC)"
.DEFAULT_GOAL := help