Skip to content

armgit / fider

Public Imported from GitHub
0

Open platform to collect and prioritize feedback

clean up makefile/travis

goenninga7de95c77ddd
diff --git a/.test.env b/.test.env
new file mode 100644
index 000000000..2e8618365
--- /dev/null
+++ b/.test.env
@@ -0,0 +1,10 @@
+GO_ENV=test
+DATABASE_URL=postgres://wchy:wchy-pw@localhost:5555/wchy?sslmode=disable
+AUTH_ENDPOINT=http://login.test.canhearyou.com:3000
+JWT_SECRET='I1$$MplJ-007A8]G#RE"0VVfvv:I~o6+2yA0@)>2|{K$Z1628z9;'w7lAsZ
+
+OAUTH_FACEBOOK_APPID=
+OAUTH_FACEBOOK_SECRET=
+
+OAUTH_GOOGLE_CLIENTID=
+OAUTH_GOOGLE_SECRET=
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
index 6df26c347..be9d24456 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -12,6 +12,10 @@ env:
global:
- GO_ENV=test
-install: make setup-ci
+install:
+ - make setup-ci
-script: make run-ci
\ No newline at end of file
+script:
+ - make test
+ - make goveralls
+ - make dockerize
\ No newline at end of file
diff --git a/Makefile b/Makefile
index 8bc743975..cedf850bc 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,9 @@
BUILD_TIME="$(shell date +"%Y.%m.%d.%H%M%S")"
+# Load .test.env file and export all env variables
+include .test.env
+export $(shell sed 's/=.*//' .test.env)
+
define tag_docker
@if [ "$(TRAVIS_BRANCH)" = "master" ]; then \
docker tag $(1) $(1):stable; \
@@ -10,9 +14,6 @@ define tag_docker
endef
test:
- AUTH_ENDPOINT=http://login.test.canhearyou.com:3000 \
- GO_ENV=test \
- JWT_SECRET=some.dummy.secret \
go test $$(go list ./... | grep -v /vendor/) -cover
setup-ci:
@@ -20,11 +21,10 @@ setup-ci:
govendor sync
govendor install +vendor
-run-ci:
- AUTH_ENDPOINT=http://login.test.canhearyou.com:3000 \
- GO_ENV=test \
- JWT_SECRET=some.dummy.secret \
+goveralls:
goveralls -service=travis-ci
+
+dockerize:
ifeq ($(TRAVIS_PULL_REQUEST), false)
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 make build
docker login -u $(DOCKER_USER) -p $(DOCKER_PASS)