2024-02-26 10:12:30 +00:00
|
|
|
install-tools:
|
2024-02-26 10:18:47 +00:00
|
|
|
go install gotest.tools/gotestsum@v1.11.0
|
2024-02-26 10:12:30 +00:00
|
|
|
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28
|
|
|
|
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2
|
2024-02-26 10:18:47 +00:00
|
|
|
go install github.com/bufbuild/buf/cmd/buf@v1.29.0
|
2024-02-26 10:12:30 +00:00
|
|
|
|
|
|
|
build: generate
|
|
|
|
buf build
|
|
|
|
go build -o bin/server .
|
|
|
|
|
|
|
|
generate:
|
|
|
|
buf generate
|
|
|
|
go generate ./...
|
|
|
|
|
|
|
|
lint:
|
|
|
|
buf lint
|
|
|
|
|
|
|
|
fmt:
|
|
|
|
buf format
|
|
|
|
go fmt ./...
|
|
|
|
|
2024-02-26 10:18:47 +00:00
|
|
|
go.mod:
|
2024-02-26 10:12:30 +00:00
|
|
|
go mod tidy
|
|
|
|
go mod verify
|
|
|
|
go.sum: go.mod
|
|
|
|
|
|
|
|
test:
|
2024-02-26 10:18:47 +00:00
|
|
|
gotestsum --format testname --junitfile unit-tests.xml -- -mod=readonly -race -coverprofile=./c.out -covermode=atomic -coverpkg=.,./... ./...
|
2024-02-26 10:12:30 +00:00
|
|
|
|
|
|
|
coverage: test
|
2024-02-26 10:18:47 +00:00
|
|
|
go tool cover -func=cover.out
|
2024-02-26 10:12:30 +00:00
|
|
|
|
|
|
|
mocks:
|
|
|
|
rm -rf mocks/*
|
|
|
|
mockery --all
|
2024-02-26 10:18:47 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
go clean
|
|
|
|
rm -f bin/*
|