From a116b3da48fc651fd5294e8b5b391aea87494edb Mon Sep 17 00:00:00 2001 From: Daniele Sluijters Date: Sun, 26 May 2019 23:35:49 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=9A=20Minor=20tweaks=20to=20CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Only upload coverage on successful builds * When a build fails, show the mosquitto logs --- .travis.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3e562f3..6a8781f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,12 +30,13 @@ before_cache: before_install: - if [[ -d $HOME/docker ]]; then ls $HOME/docker/*.tar.gz | xargs -I {file} sh -c "zcat {file} | docker load"; fi - docker pull eclipse-mosquitto:1.6.2 - - docker run -d -p 127.0.0.1:1883:1883 eclipse-mosquitto:1.6.2 + - docker run -d --name broker -p 127.0.0.1:1883:1883 eclipse-mosquitto:1.6.2 -- mosquitto -v - docker ps - go mod download install: go build ./... script: go test -race -v -coverprofile=profile.cov $(go list ./...) -after_script: +after_success: - go get github.com/mattn/goveralls - $GOPATH/bin/goveralls -coverprofile=profile.cov -service=travis-ci - +after_failure: + - docker logs broker