summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 21 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index dc6cc3dc7..e59e03ee7 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-.PHONY: all test clean build install run stop cover dist dist-battlehouse cleandb
+.PHONY: all test clean build install run stop cover dist cleandb travis
GOPATH ?= $(GOPATH:)
GOFLAGS ?= $(GOFLAGS:)
@@ -15,7 +15,25 @@ DIST_RESULTS=$(DIST_ROOT)/results
BENCH=.
TESTS=.
-all: build
+all: travis
+
+travis:
+ @echo building for travis
+
+ rm -Rf $(DIST_ROOT)
+ @go clean $(GOFLAGS) -i ./...
+
+ @cd web/react/ && npm install
+
+ @go build $(GOFLAGS) ./...
+
+ @mkdir -p logs
+
+ @go test $(GOFLAGS) -run=$(TESTS) -test.v -test.timeout=180s ./api || exit 1
+ @go test $(GOFLAGS) -run=$(TESTS) -test.v -test.timeout=12s ./model || exit 1
+ @go test $(GOFLAGS) -run=$(TESTS) -test.v -test.timeout=120s ./store || exit 1
+ @go test $(GOFLAGS) -run=$(TESTS) -test.v -test.timeout=120s ./utils || exit 1
+ @go test $(GOFLAGS) -run=$(TESTS) -test.v -test.timeout=120s ./web || exit 1
build:
@go build $(GOFLAGS) ./...
@@ -25,7 +43,7 @@ install:
@if [ $(shell docker ps | grep -ci mattermost-mysql) -eq 0 ]; then \
echo restoring go libs using godep; \
- ../../../../bin/godep restore; \
+ $(GOPATH)/bin/godep restore; \
echo starting mattermost-mysql; \
docker run --name mattermost-mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=mostest \
-e MYSQL_USER=mmuser -e MYSQL_PASSWORD=mostest -e MYSQL_DATABASE=mattermost_test -d mysql > /dev/null; \