Enhance development workflow with Docker integration

- Updated CONTRIBUTING.md to clarify the use of Makefile targets for running tasks inside Docker, eliminating the need for local Go or Node installations.
- Introduced docker-compose.tools.yml for backend and frontend tools, allowing for streamlined testing, linting, and formatting.
- Created Dockerfile.tools to set up a Go environment with necessary tools for testing and linting.
- Modified Makefile to include separate targets for backend and frontend tests, improving clarity and usability.
- Updated documentation in development.md and testing.md to reflect the new Docker-based workflow for running tests and development tasks.
This commit is contained in:
2026-03-04 11:39:27 +03:00
parent adfdfd01c4
commit a3a4c0e896
8 changed files with 120 additions and 84 deletions

View File

@@ -1,4 +1,6 @@
.PHONY: dev build test lint fmt generate-frontend clean
.PHONY: dev build test test-backend test-frontend lint fmt generate-frontend clean
TOOLS_COMPOSE = docker compose -f docker-compose.tools.yml
dev:
docker compose -f docker-compose.dev.yml up
@@ -6,16 +8,21 @@ dev:
build:
docker compose -f docker-compose.prod.yml build
test:
go test ./...
test: test-backend test-frontend
test-backend:
$(TOOLS_COMPOSE) run --rm backend-tools go test ./...
test-frontend:
$(TOOLS_COMPOSE) run --rm frontend-tools sh -c "npm ci && npm test"
lint:
golangci-lint run
npm --prefix frontend-nuxt run lint
$(TOOLS_COMPOSE) run --rm backend-tools golangci-lint run
$(TOOLS_COMPOSE) run --rm frontend-tools sh -c "npm ci && npm run lint"
fmt:
go fmt ./...
npm --prefix frontend-nuxt run format
$(TOOLS_COMPOSE) run --rm backend-tools go fmt ./...
$(TOOLS_COMPOSE) run --rm frontend-tools sh -c "npm ci && npm run format"
generate-frontend:
npm --prefix frontend-nuxt run generate