-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
54 lines (40 loc) · 1.12 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
.PHONY: clean build test
all: assemble
doc:
@echo "\nGenerating documentation at localhost:6060. Press Ctrl|Command + C to exit\n"
@godoc -http=:6060
lint:
@echo "\nApplying golint\n"
@golint ./...
fmt:
@echo "\nFormatting go files\n"
@go fmt ./...
vet:
@echo "\nApplying go vet\n"
@go vet ./...
assemble: fmt lint vet
@echo "\nBuilding application\n"
@go build
unit-test:
@echo "\nRunning unit tests\n"
@go test -cover -short ./...
it-test: unit-test
@echo "\nRunning integration tests locally\n"
@go test -cover -run Integration ./...
test: fmt unit-test install it-test
@echo "\nRunning tests\n"
install:
@echo "\nStarting fake account API\n"
@docker-compose up -d --force-recreate --remove-orphans
uninstall:
@echo "\nStopping fake account API\n"
@docker-compose stop
clean: uninstall
@echo "\nCleaning all images"
@cd scripts && sh clean.sh
compose-test:
@echo "\nRunning all test in a containerized environment\n"
@docker-compose run --rm it-test
test-container: unit-test
@echo "\nRunning integration tests in container environment\n"
@go test -cover -run Integration ./... -args -itaddr=accountapi