2024-05-02 19:50:11 +00:00
|
|
|
.PHONY: fmt lint test mocks test_coverage test_ci
|
2023-11-08 17:11:42 +00:00
|
|
|
|
|
|
|
|
GO_PKGS := $(shell go list -f {{.Dir}} ./...)
|
|
|
|
|
|
|
|
|
|
fmt:
|
|
|
|
|
@go list -f {{.Dir}} ./... | xargs -I{} gofmt -w -s {}
|
|
|
|
|
|
|
|
|
|
lint:
|
|
|
|
|
@grep "^func " example_test.go | sort -c
|
|
|
|
|
@golangci-lint run
|
|
|
|
|
|
|
|
|
|
test:
|
|
|
|
|
@go test -race -v $(GO_FLAGS) -count=1 $(GO_PKGS)
|
2023-11-08 19:53:56 +00:00
|
|
|
|
|
|
|
|
test_coverage:
|
|
|
|
|
@go test -race -v $(GO_FLAGS) -count=1 -coverprofile=coverage.out -covermode=atomic $(GO_PKGS)
|
2023-11-09 22:00:18 +00:00
|
|
|
|
2024-05-02 19:50:11 +00:00
|
|
|
test_ci:
|
|
|
|
|
@TEST_ENV=ci go test -race -v $(GO_FLAGS) -count=1 $(GO_PKGS)
|
|
|
|
|
|
2023-11-09 22:00:18 +00:00
|
|
|
mocks:
|
|
|
|
|
@go generate ./...
|