Files
3ybactuk-marketplace-go-ser…/Makefile
Никита Шубин b88dfe6db5 [hw-3] loms service
2025-06-20 10:11:59 +00:00

35 lines
1.1 KiB
Makefile

include make/lint.mk
include make/build.mk
include make/coverage.mk
include make/generate.mk
PKGS = $(shell go list ./... | grep -vE 'mock|config|generated|header|document|internal/pb')
INTEGRATION_TAG = integration
.PHONY: lint, coverage
lint: cart-lint loms-lint notifier-lint comments-lint
build: cart-build loms-build notifier-build comments-build
coverage: cart-coverage loms-coverage notifier-coverage comments-coverage
generate: cart-generate loms-generate notifier-generate comments-generate
cd pkg && go mod tidy
run-all:
echo "starting build"
docker-compose up --build
.PHONY: .integration-test
integration-test:
ALLURE_OUTPUT_PATH=$(shell pwd)/allure-results ALLURE_OUTPUT_FOLDER=cart go test -v -tags=$(INTEGRATION_TAG) ./cart/tests/integration
ALLURE_OUTPUT_PATH=$(shell pwd)/allure-results ALLURE_OUTPUT_FOLDER=loms go test -v -tags=$(INTEGRATION_TAG) ./loms/tests/integration
bench:
go test -bench=BenchmarkInMemoryRepository -benchmem ./cart/internal/domain/cart/repository -benchtime 3s
.PHONY: .serve-swagger
.serve-swagger:
bin/swagger serve api/openapiv2/loms/v1/loms.swagger.json --no-open