| 1 |
.PHONY: help deps fmt lint test test-race test-integration |
| 2 |
|
| 3 |
help: |
| 4 |
@echo "" |
| 5 |
@echo "Welcome to slack-go/slack make." |
| 6 |
@echo "The following commands are available:" |
| 7 |
@echo "" |
| 8 |
@echo " make deps : Fetch all dependencies" |
| 9 |
@echo " make fmt : Run go fmt to fix any formatting issues" |
| 10 |
@echo " make lint : Use go vet to check for linting issues" |
| 11 |
@echo " make test : Run all short tests" |
| 12 |
@echo " make test-race : Run all tests with race condition checking" |
| 13 |
@echo " make test-integration : Run all tests without limiting to short" |
| 14 |
@echo "" |
| 15 |
@echo " make pr-prep : Run this before making a PR to run fmt, lint and tests" |
| 16 |
@echo "" |
| 17 |
|
| 18 |
deps: |
| 19 |
@go mod tidy |
| 20 |
|
| 21 |
fmt: |
| 22 |
@go fmt . |
| 23 |
|
| 24 |
lint: |
| 25 |
@go vet . |
| 26 |
|
| 27 |
test: |
| 28 |
@go test -v -count=1 -timeout 300s -short ./... |
| 29 |
|
| 30 |
test-race: |
| 31 |
@go test -v -count=1 -timeout 300s -short -race ./... |
| 32 |
|
| 33 |
test-integration: |
| 34 |
@go test -v -count=1 -timeout 600s ./... |
| 35 |
|
| 36 |
pr-prep: fmt lint test-race test-integration |