Skip to content

armgit / fider

Public Imported from GitHub
0

Open platform to collect and prioritize feedback

fix wercker

goenning2d05ccfe2752
diff --git a/.ci.env b/.ci.env
new file mode 100644
index 000000000..266e26954
--- /dev/null
+++ b/.ci.env
@@ -0,0 +1,4 @@
+GO_ENV=test
+DATABASE_URL=postgres://wechy_test:wechy_test-pw@postgres:5432/wechy_test?sslmode=disable
+AUTH_ENDPOINT=http://login.test.canhearyou.com:3000
+JWT_SECRET=I1$$MplJ-007A8]G#RE0VVfvv:I~o6+2yA0@)>2|{K$Z1628z9;w7lAsZ
\ No newline at end of file
diff --git a/Makefile b/Makefile
index eeb982cd6..e7cf01d0a 100644
--- a/Makefile
+++ b/Makefile
@@ -6,6 +6,9 @@ define tag_docker
fi
endef
+ci-test:
+ godotenv -f .ci.env go test $$(go list ./... | grep -v /vendor/) -cover -p=1
+
test:
godotenv -f .test.env go test $$(go list ./... | grep -v /vendor/) -cover -p=1
diff --git a/wercker.yml b/wercker.yml
index 4322c8394..5d4c989d0 100644
--- a/wercker.yml
+++ b/wercker.yml
@@ -17,10 +17,13 @@ box: golang:1.8
# - mongo
# http://devcenter.wercker.com/docs/services/mongodb.html
build:
- # The steps that will be executed on build
- # Steps make up the actions in your pipeline
- # Read more about steps on our dev center:
- # http://devcenter.wercker.com/docs/steps/index.html
+ services:
+ - id: postgres
+ tag: 9.6
+ env:
+ POSTGRES_USER: wechy_test
+ POSTGRES_PASSWORD: wechy_test-pw
+
steps:
# Sets the go workspace and places you package
# at the right place in the workspace tree
@@ -31,11 +34,6 @@ build:
code: |
go get github.com/joho/godotenv/cmd/godotenv
- - script:
- name: start postgres
- code: |
- docker-compose up -d pgtest
-
# Test the project
- script:
name: run test