forked from RichardKnop/machinery
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (35 loc) · 1.08 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
.PHONY: update-deps install-deps fmt lint golint test test-with-coverage ci
# TODO: When Go 1.9 is released vendor folder should be ignored automatically
PACKAGES=`go list ./... | grep -v vendor | grep -v mocks`
update-deps:
rm -rf Godeps
rm -rf vendor
go get github.com/tools/godep
godep save ./...
install-deps:
go get github.com/tools/godep
godep restore
fmt:
for pkg in ${PACKAGES}; do \
go fmt $$pkg; \
done;
lint:
gometalinter --disable-all -E vet -E gofmt -E misspell -E ineffassign -E goimports -E deadcode --tests --vendor ./...
golint:
for pkg in ${PACKAGES}; do \
golint $$pkg; \
done;
test:
for pkg in ${PACKAGES}; do \
go test $$pkg; \
done;
test-with-coverage:
echo "" > coverage.out
echo "mode: set" > coverage-all.out
for pkg in ${PACKAGES}; do \
go test -coverprofile=coverage.out -covermode=set $$pkg; \
tail -n +2 coverage.out >> coverage-all.out; \
done;
#go tool cover -html=coverage-all.out
ci:
bash -c '(docker-compose -f docker-compose.test.yml -p machinery_ci up --build -d) && (docker logs -f machinery_sut &) && (docker wait machinery_sut)'