-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
45 lines (29 loc) · 1011 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
45
DOCKER_DIR := ${CURDIR}/build/package
build-all:
go run cmd/sessions/main.go
build-docker:
docker build --no-cache --network host -t sessions-service -f ${DOCKER_DIR}/sessions-service.Dockerfile .
docker build --no-cache --network host -t music-service -f ${DOCKER_DIR}/music-service.Dockerfile .
docker build --no-cache --network host -t profiles-service -f ${DOCKER_DIR}/profiles-service.Dockerfile .
build-and-run: build-docker
docker-compose up
test-pr:
go test -v -coverprofile cover.out ./...
go tool cover -html=cover.out -o cover.html
coverage:
go test -covermode=atomic -coverpkg=./... -coverprofile=cover ./...
cat cover | fgrep -v "mock" | fgrep -v "pb.go" | fgrep -v "easyjson" | fgrep -v "start.go" > cover2
go tool cover -func=cover2
clear-dockers:
docker-compose down
docker system prune -a
docker volume prune
linter:
golangci-lint run
.PHONY: build_profile
build_profile:
go build -v ./cmd/profiles
.PHONY: clean
clean:
rm -rf *.o
.DEFAULT_GOAL := build_profile