From f57acc57fe70d9c46a4d4fb9d2a66b1334801f6c Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Wed, 28 Jan 2015 10:29:40 -0900 Subject: [PATCH] Working in shippable config. --- .travis.yml | 10 ---------- datastore/db.go | 2 ++ shippable.yml | 26 ++++++++++++++++++++++++++ 3 files changed, 28 insertions(+), 10 deletions(-) delete mode 100644 .travis.yml create mode 100644 shippable.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ca9f367..0000000 --- a/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: go - -addons: - postgresql: 9.3 - -go: 1.4 - -before_script: - - psql -c 'CREATE DATABASE bactdbtest;' -U postgres - diff --git a/datastore/db.go b/datastore/db.go index 209a9aa..8004289 100644 --- a/datastore/db.go +++ b/datastore/db.go @@ -100,6 +100,8 @@ func setDBCredentials() string { conn, _ := pq.ParseURL(url) connection += conn connection += " sslmode=require" + } else { + connection += " sslmode=disable" } return connection } diff --git a/shippable.yml b/shippable.yml new file mode 100644 index 0000000..f0638e6 --- /dev/null +++ b/shippable.yml @@ -0,0 +1,26 @@ +language: go + +addons: + postgresql: 9.3 + +go: 1.4 + +before_install: + - export GOPATH=$SHIPPABLE_GOPATH + - source $HOME/.gvm/scripts/gvm + - gvm install go$SHIPPABLE_GO_VERSION + - gvm use go$SHIPPABLE_GO_VERSION + - go get github.com/t-yuki/gocover-cobertura + - go get github.com/onsi/gomega + - go get github.com/onsi/ginkgo + - go get code.google.com/p/go.tools/cmd/cover + +before_script: + - psql -c 'CREATE DATABASE bactdbtest;' -U postgres + - mkdir -p shippable/testresults + - mkdir -p shippable/codecoverage + +script: + - go test -coverprofile=coverage.txt -covermode count ./ + - $GOPATH/bin/gocover-cobertura < coverage.txt > shippable/codecoverage/coverage.xml +