-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (26 loc) · 990 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
deps: ## Get the dependencies
@go mod vendor
# ----
## LINTER stuff start
linter_include_check:
@[ -f linter.mk ] && echo "linter.mk include exists" || (echo "getting linter.mk from github.com" && curl -sO https://raw.githubusercontent.com/spacetab-io/makefiles/master/golang/linter.mk)
.PHONY: lint
lint: linter_include_check
@make -f linter.mk go_lint
## LINTER stuff end
# ----
# ----
## TESTS stuff start
tests_include_check:
@[ -f tests.mk ] && echo "tests.mk include exists" || (echo "getting tests.mk from github.com" && curl -sO https://raw.githubusercontent.com/spacetab-io/makefiles/master/golang/tests.mk)
tests: tests_include_check
@make -f tests.mk go_tests
.PHONY: tests
tests_html: tests_include_check
@make -f tests.mk go_tests_html
.PHONY: tests
## TESTS stuff end
# ----
tests_in_docker: ## Testing code with unit tests in docker container
docker run --rm -v $(shell pwd):/app -i spacetabio/docker-test-golang:1.14-1.0.2 make tests
.PHONY: tests_in_docker