From 548fa5629c5bd4c85afad678f4c74ed3d339347a Mon Sep 17 00:00:00 2001 From: shunsuke maeda Date: Sat, 8 Jun 2019 23:01:32 +0900 Subject: [PATCH 1/2] Add integration test --- .travis.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.travis.yml b/.travis.yml index b1cf2ab4..151aa52c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,12 +22,20 @@ cache: directories: - $GOPATH/pkg/mod/cache +services: + - docker + install: true before_script: # download dependencies - go mod download script: - go test -coverprofile cover.out $(go list ./... | grep -v mock_) + - | + if [ "$TRAVIS_GO_VERSION" = "1.12.x" ] && [ "$TRAVIS_OS_NAME" = "linux" ] ; then + make build + ./duci health + fi after_success: # for coverage report - GO111MODULE=off go get -u github.com/mattn/goveralls From 787e012f0c3de6ef3ce77bdb3bb0c8c103e6517a Mon Sep 17 00:00:00 2001 From: shunsuke maeda Date: Sun, 9 Jun 2019 00:44:36 +0900 Subject: [PATCH 2/2] more readable --- .travis.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 151aa52c..15b0eff3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,23 +1,22 @@ +language: go + os: - linux - osx - windows - -language: go go: - "1.11.x" - "1.12.x" - tip +env: + global: + - GO111MODULE=on matrix: allow_failures: - go: tip - os: windows -env: - global: - - GO111MODULE=on - cache: directories: - $GOPATH/pkg/mod/cache @@ -39,7 +38,10 @@ script: after_success: # for coverage report - GO111MODULE=off go get -u github.com/mattn/goveralls - - if [ "$TRAVIS_GO_VERSION" = "1.12.x" ] && [ "$TRAVIS_OS_NAME" = "linux" ]; then goveralls -service=travis-ci -coverprofile=cover.out -ignore=main.go; fi + - | + if [ "$TRAVIS_GO_VERSION" = "1.12.x" ] && [ "$TRAVIS_OS_NAME" = "linux" ] ; then + goveralls -service=travis-ci -coverprofile=cover.out -ignore=main.go + fi before_deploy: # copy dependencies to vendor - go mod vendor