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