Skip to content

Commit

Permalink
Merge pull request #89 from onomyprotocol/dong/make-file
Browse files Browse the repository at this point in the history
Makefile: Add make test, linit, install
  • Loading branch information
DongLieu authored Nov 11, 2024
2 parents 455ca07 + 41086b0 commit 99ca166
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,30 @@

DOCKER := $(shell which docker)

BUILD_FLAGS := -ldflags '$(ldflags)' -gcflags="all=-N -l"

install: go.sum
go install $(BUILD_FLAGS) ./cmd/reserved

###############################################################################
### Test ###
###############################################################################
TEST_FLAGS := -v

test:
go test $(TEST_FLAGS) ./...


###############################################################################
### Linting ###
###############################################################################
golangci_lint_cmd=golangci-lint
golangci_version=v1.60.1

lint:
@echo "--> Running linter"
@go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(golangci_version)
@$(golangci_lint_cmd) run --timeout=10m

###############################################################################
### Protobuf ###
Expand Down

0 comments on commit 99ca166

Please sign in to comment.