github.com/webdestroya/awsmocker@v0.2.6/Makefile (about) 1 .PHONY: generate 2 generate: 3 go generate ./... 4 5 6 .PHONY: tidy 7 tidy: 8 go mod verify 9 go mod tidy 10 @if ! git diff --quiet go.mod go.sum; then \ 11 echo "please run go mod tidy and check in changes, you might have to use the same version of Go as the CI"; \ 12 exit 1; \ 13 fi 14 15 .PHONY: lint-install 16 lint-install: 17 @echo "Installing golangci-lint" 18 go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.46.2 19 20 .PHONY: lint 21 lint: 22 @which golangci-lint >/dev/null 2>&1 || { \ 23 echo "golangci-lint not found, please run: make lint-install"; \ 24 exit 1; \ 25 } 26 @golangci-lint run && echo "All Good!" 27 28 .PHONY: test-release 29 test-release: 30 goreleaser release --skip-publish --rm-dist --snapshot 31 32 .PHONY: test 33 test: 34 go test -timeout 180s -v ./... 35 36 .PHONY: test-debug 37 test-debug: 38 AWSMOCKER_DEBUG=true go test -timeout 180s -v ./... 39 40 .PHONY: coverage 41 coverage: 42 @mkdir -p coverage 43 @go test . -cover -coverprofile=coverage/c.out -covermode=count 44 @go tool cover -html=coverage/c.out -o coverage/index.html