-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (30 loc) · 847 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
.PHONY: test docs build
all: lint build test
lint:
golangci-lint run
build:
go build ./pkg/notifier
go build -o ./build -i ./cmd/notify
go build -o ./build -i ./cmd/notify-test-server
test:
go test -cover -v -race ./...
coverage:
go test -coverprofile cover.out ./...
go tool cover -html=cover.out
docs:
@echo "Docs available at: http://localhost:8888/pkg/github.com/idexter/notifier-test-task/"
godoc -http :8888
ci-coverage-dependencies:
go get github.com/axw/gocov/...
go get github.com/AlekSi/gocov-xml
go mod tidy
ci-coverage-report: ci-coverage-dependencies
go test -race -covermode=atomic -coverprofile=coverage.txt ./...
gocov convert coverage.txt | gocov-xml > coverage.xml
clean:
rm -f ./build/notify
rm -f ./build/notify-test-server
rm -f trace.out
rm -f cover.out
rm -f ./coverage.txt
rm -f ./coverage.xml