Skip to content

Commit

Permalink
💚 Minor tweaks to CI
Browse files Browse the repository at this point in the history
* Only upload coverage on successful builds
* When a build fails, show the mosquitto logs
  • Loading branch information
daenney committed May 26, 2019
1 parent e4289b1 commit a116b3d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit a116b3d

Please sign in to comment.