Last active
June 12, 2019 06:39
-
-
Save ridhoperdana/e55066136ad0030111d7dbfe679fdc07 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BINARY=crawler | |
# Installing dependency | |
.PHONY: vendor | |
go mod vendor | |
# Linter | |
.PHONY: vendor lint-prepare | |
lint-prepare: | |
@echo "Installing golangci-lint" | |
@go get github.com/golangci/golangci-lint/cmd/golangci-lint | |
.PHONY: lint | |
lint: lint-prepare | |
@echo "Run lint" | |
@golangci-lint run \ | |
--exclude-use-default=false \ | |
--enable=golint \ | |
--enable=gocyclo \ | |
--enable=goconst \ | |
--enable=unconvert \ | |
./... | |
# Required service | |
.PHONY: pubsub-up | |
pubsub-up: | |
@docker-compose up -d crawler_pubsub | |
build: test | |
go build -o ${BINARY} github.com/KurioApp/crawler/cmd/crawler | |
# Test | |
.PHONY: test | |
test: | |
@echo "Run go test" | |
go test ./... -v -race -cover | |
.PHONY: unittest | |
unittest: | |
@echo "Run go test" | |
go test -short -v ./... | |
.PHONY: pubsub-down | |
pubsub-down: | |
@docker stop crawler_pubsub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment