Re-arrange travis build.

This commit is contained in:
David Newhall II 2019-06-24 01:06:38 -07:00
parent 91bc422f7f
commit a18642b0df
1 changed files with 2 additions and 6 deletions

View File

@ -13,7 +13,7 @@ go:
- 1.12.x
services:
- docker
before_install:
install:
- mkdir -p $GOPATH/bin
# Download the `dep` binary to bin folder in $GOPATH
- curl -sLo $GOPATH/bin/dep https://github.com/golang/dep/releases/download/v0.5.3/dep-linux-amd64
@ -22,15 +22,11 @@ before_install:
- curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin latest
#- curl -sL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin latest
- rvm install 2.0.0
install:
- rvm 2.0.0 do gem install --no-document fpm
- make docker
script:
# Test built docker image.
- docker run -d --name unifi-poller golift/unifi-poller | tee docker_id
# Once we figure out how to keep it running we can remove the -a in ps args.
- docker ps -a | grep -q unifi-poller
- docker logs $(<docker_id) 2>&1 | grep -Eq "Loading Configuration File[:] /etc/unifi-poller/up.conf"
- docker run golift/unifi-poller 2>&1 | grep -Eq "Loading Configuration File[:] /etc/unifi-poller/up.conf"
# test and build everything
- rvm 2.0.0 do make release
after_success: