2025-02-24 22:04:19 +08:00
|
|
|
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
|
|
|
|
|
ifeq (,$(shell go env GOBIN))
|
|
|
|
|
GOBIN = $(shell go env GOPATH)/bin
|
|
|
|
|
else
|
|
|
|
|
GOBIN = $(shell go env GOBIN)
|
|
|
|
|
endif
|
|
|
|
|
|
2025-02-07 18:00:14 +08:00
|
|
|
all: test
|
2024-09-10 17:26:46 +08:00
|
|
|
|
|
|
|
|
format:
|
|
|
|
|
go fmt ./...
|
|
|
|
|
|
|
|
|
|
vet:
|
2025-02-17 21:04:13 +08:00
|
|
|
go vet ./pkg/rabbitmqamqp
|
2025-02-27 20:58:59 +08:00
|
|
|
go vet ./docs/examples/...
|
2024-09-10 17:26:46 +08:00
|
|
|
|
2025-02-24 22:04:19 +08:00
|
|
|
STATICCHECK ?= $(GOBIN)/staticcheck
|
|
|
|
|
STATICCHECK_VERSION ?= latest
|
|
|
|
|
$(STATICCHECK):
|
|
|
|
|
go install honnef.co/go/tools/cmd/staticcheck@$(STATICCHECK_VERSION)
|
|
|
|
|
check: $(STATICCHECK)
|
|
|
|
|
$(STATICCHECK) ./pkg/rabbitmqamqp
|
2025-02-27 20:58:59 +08:00
|
|
|
$(STATICCHECK) ./docs/examples/...
|
2025-02-24 22:04:19 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
test: format vet check
|
2025-02-17 21:04:13 +08:00
|
|
|
cd ./pkg/rabbitmqamqp && go run -mod=mod github.com/onsi/ginkgo/v2/ginkgo \
|
2024-09-10 17:26:46 +08:00
|
|
|
--randomize-all --randomize-suites \
|
|
|
|
|
--cover --coverprofile=coverage.txt --covermode=atomic \
|
|
|
|
|
--race
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-03-05 16:46:28 +08:00
|
|
|
rabbitmq-server-start:
|
|
|
|
|
./.ci/ubuntu/gha-setup.sh start pull
|
2024-09-10 17:26:46 +08:00
|
|
|
|
|
|
|
|
rabbitmq-server-stop:
|
|
|
|
|
./.ci/ubuntu/gha-setup.sh stop
|