forked from VictorAvelar/mollie-api-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
61 lines (47 loc) · 1.61 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
build:
@docker build -t mollie-go:latest -f Dockerfile .
.PHONY: build
run:
@docker run --rm mollie-go:latest
.PHONY: run
ci-lint:
# colored-line-number|line-number|json|tab|checkstyle|code-climate|junit-xml|github-actions
@golangci-lint run --out-format=tab --issues-exit-code=0 --sort-results --skip-dirs-use-default --tests=false --presets=bugs,complexity,format,performance,style,unused
.PHONY: ci-lint
pr-lint:
@golangci-lint run --issues-exit-code=0 --out-format=github-actions --new=true --sort-results --skip-dirs-use-default --tests=false --presets=bugs,complexity,format,performance,style,unused
.PHONY: pr-lint
ci-all-presets:
@golangci-lint run --out-format=tab --issues-exit-code=0 --sort-results --skip-dirs-use-default --tests=false --presets=bugs,comment,complexity,error,format,import,metalinter,module,performance,sql,style,test,unused
.PHONY: ci-all-presets
lint:
@go version
@echo "Running go lint"
@golint ./...
@echo "Running go vet"
@go vet ./...
.PHONY: lint
test: run
.PHONY: test
test-local:
@go test -v -failfast ./mollie/... -coverprofile cover.out
.PHONY: test-local
coverage: test-local
@go tool cover -func=cover.out
.PHONY: coverage
cover-report: test-local
@go tool cover -html=cover.out
.PHONY: cover-report
clean:
@go mod verify
@go mod tidy -go=1.16
@go mod tidy -go=1.17
.PHONY: clean
update-docs:
@godocdown ./mollie > docs/README.md
.PHONY: update-docs
sub-pkg-docs:
@godocdown ./mollie/connect > docs/connect/README.md
@godocdown ./mollie/tools > docs/tools/README.md
@godocdown ./mollie/tools/idempotency > docs/tools/idempotency/README.md
.PHONY: sub-pkg-docs