forked from barnybug/cli53
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (29 loc) · 1015 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
export GO15VENDOREXPERIMENT=1
exe = ./cmd/cli53
.PHONY: all build install test coverage deps
all: install
deps:
go get github.com/wadey/gocovmerge
go get github.com/gucumber/gucumber/cmd/gucumber
build:
go build -i -v $(exe)
install:
go install $(exe)
upx:
upx dist/cli53-linux-386/cli53-linux-386 dist/cli53-linux-arm/cli53-linux-arm dist/cli53-windows-386/cli53-windows-386.exe
test-unit:
go test
test-integration: build
gucumber
# run unit and system tests, then recombine coverage output
test-coverage:
rm -rf coverage && mkdir coverage
go test -covermode=count -coverprofile=coverage/unit.txt
go test -c -covermode=count -coverpkg . -o ./cli53 ./cmd/cli53
COVERAGE=1 gucumber
gocovmerge coverage/*.txt > coverage.txt
test: test-unit test-integration
docker-build:
sudo docker run --rm -v `pwd`:/go/src/github.com/barnybug/cli53 -w /go/src/github.com/barnybug/cli53 golang:1.6-alpine sh -c 'apk add --no-cache make git && make build'
sudo docker build -t barnybug/cli53 .
rm -f cli53