-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
55 lines (47 loc) · 1.34 KB
/
Makefile
File metadata and controls
55 lines (47 loc) · 1.34 KB
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
55
.PHONY: 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`
install:
go install \
github.com/Joker/jade/cmd/jade@latest
generate:
jade -basedir=./web -writer -pkg=web -d=./web \
account.pug \
account_settings.pug \
authorize.pug \
contact.pug \
index.pug \
join.pug \
login.pug \
membership.pug \
password_reset.pug \
password_reset_update_password.pug \
profile.pug
fmt:
for pkg in ${PACKAGES}; do \
go fmt $$pkg; \
done;
lint:
gometalinter --tests --disable-all --deadline=120s -E vet -E gofmt -E misspell -E ineffassign -E goimports -E deadcode ./...
golint:
for pkg in ${PACKAGES}; do \
golint $$pkg; \
done;
test:
TEST_FAILED= ; \
for pkg in ${PACKAGES}; do \
go test $$pkg || TEST_FAILED=1; \
done; \
[ -z "$$TEST_FAILED" ]
test-with-coverage:
echo "" > coverage.out
echo "mode: set" > coverage-all.out
TEST_FAILED= ; \
for pkg in ${PACKAGES}; do \
go test -coverprofile=coverage.out -covermode=set $$pkg || TEST_FAILED=1; \
tail -n +2 coverage.out >> coverage-all.out; \
done; \
[ -z "$$TEST_FAILED" ]
#go tool cover -html=coverage-all.out
ci:
bash -c 'docker-compose -f docker-compose.test.yml -p go_oauth2_server_ci up --build --abort-on-container-exit --exit-code-from sut'