From 66f3dcfdad1df0dea4abd06ff174a2b00c77754e Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Sun, 11 Dec 2016 11:53:26 +0800 Subject: [PATCH 1/3] Testing all packages and generate all coverage report. Signed-off-by: Bo-Yi Wu --- .gitignore | 1 + .travis.yml | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 9f48f142..4e35edcd 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ Godeps/* !Godeps/Godeps.json coverage.out count.out +.cover diff --git a/.travis.yml b/.travis.yml index 53f436f4..11a5a1b6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,11 +7,18 @@ go: - 1.7.4 - tip +install: + - wget https://raw.githubusercontent.com/appleboy/golang-testing/master/coverage.sh -O ${GOPATH}/bin/coverage + - chmod +x ${GOPATH}/bin/coverage + # install dependency tools + - coverage tool + script: - - go test -v -covermode=count -coverprofile=coverage.out + - coverage testing + - coverage coverage after_success: - - bash <(curl -s https://codecov.io/bash) + - bash <(curl -s https://codecov.io/bash) -f .cover/coverage.txt notifications: webhooks: From 83605b37d63151d3cc1a41b8b6a67e58aedcbae3 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Sun, 11 Dec 2016 11:54:57 +0800 Subject: [PATCH 2/3] check bin folder exist. Signed-off-by: Bo-Yi Wu --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 11a5a1b6..15dca68e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,7 @@ go: - tip install: + - test -d ${GOPATH}/bin || mkdir -p ${GOPATH}/bin - wget https://raw.githubusercontent.com/appleboy/golang-testing/master/coverage.sh -O ${GOPATH}/bin/coverage - chmod +x ${GOPATH}/bin/coverage # install dependency tools From c8d445b6af5c76888cef7505d5361d8484892082 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Sun, 11 Dec 2016 11:58:31 +0800 Subject: [PATCH 3/3] install gin dependency. Signed-off-by: Bo-Yi Wu --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 15dca68e..85ba5aae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,7 @@ install: - chmod +x ${GOPATH}/bin/coverage # install dependency tools - coverage tool + - go get -d -t -v ./... script: - coverage testing