File tree Expand file tree Collapse file tree 3 files changed +47
-4
lines changed
Expand file tree Collapse file tree 3 files changed +47
-4
lines changed Original file line number Diff line number Diff line change 99 - " 1.11"
1010 - " stable"
1111
12+ env :
13+ - MAKE_TASK=test-unit
14+ - MAKE_TASK=test-integration
15+
16+ before_install :
17+ - docker-compose up -d
18+
1219install :
1320 - go get -v -d
1421 - go get -u github.com/onsi/ginkgo/ginkgo
1522 - go get -u github.com/onsi/gomega
1623
17- script : ginkgo -r
24+ script :
25+ - make $MAKE_TASK
26+
27+ after_script :
28+ - docker-compose down -v
Original file line number Diff line number Diff line change 1+ NO_COLOR =\033[0m
2+ OK_COLOR =\033[32;01m
3+
4+ format :
5+ @echo " $( OK_COLOR) ==> checking code formating with 'gofmt' tool$( NO_COLOR) "
6+ @gofmt -l -s cmd pkg | grep " .*\.go" ; if [ " $$ ?" = " 0" ]; then exit 1; fi
7+
8+ vet :
9+ @echo " $( OK_COLOR) ==> checking code correctness with 'go vet' tool$( NO_COLOR) "
10+ @go vet ./...
11+
12+ lint : tools.golint
13+ @echo " $( OK_COLOR) ==> checking code style with 'golint' tool$( NO_COLOR) "
14+ @go list ./... | xargs -n 1 golint -set_exit_status
15+
16+ test-integration : lint format vet
17+ @echo " $( OK_COLOR) ==> Running integration tests$( NO_COLOR) "
18+ @STORAGE_DSN=mongodb://localhost:27017/ BROKER_DSN=amqp://guest:guest@localhost:5672/ go run ./cmd/goengine/...
19+
20+ test-unit : lint format vet
21+ @echo " $( OK_COLOR) ==> Running unit tests$( NO_COLOR) "
22+ @ginkgo -r
23+
24+ # ---------------
25+ # -- tools
26+ # ---------------
27+
28+ tools : tools.golint
29+
30+ tools.golint :
31+ @command -v golint > /dev/null ; if [ $$ ? -ne 0 ]; then \
32+ echo " --> installing golint" ; \
33+ go get github.com/golang/lint/golint; \
34+ fi
You can’t perform that action at this time.
0 commit comments