-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
34 lines (27 loc) · 946 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
GOLANGCI_VERSION = 1.34.0
ci: deps lint test ##=> Run all CI targets
.PHONY: ci
lint: bin/golangci-lint ##=> Lint all the things
@echo "--- lint all the things"
@bin/golangci-lint run
.PHONY: lint
clean: ##=> Clean all the things
$(info [+] Clean all the things...")
.PHONY: clean
bin/golangci-lint: bin/golangci-lint-${GOLANGCI_VERSION}
@ln -sf golangci-lint-${GOLANGCI_VERSION} bin/golangci-lint
bin/golangci-lint-${GOLANGCI_VERSION}:
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | BINARY=golangci-lint bash -s -- v${GOLANGCI_VERSION}
@mv bin/golangci-lint $@
test: ##=> Run the tests
$(info [+] Run tests...")
@go test -v -race -cover ./...
.PHONY: test
lintv2: bin/golangci-lint ##=> Lint all the v2 things
@echo "--- lint all the things"
@cd v2; ../bin/golangci-lint run
.PHONY: lintv2
testv2: ##=> Run the tests
$(info [+] Run v2 tests...")
@cd v2; go test -v -cover ./...
.PHONY: testv2