Skip to content

travis.yml: add integration tests #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 27, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,25 @@
sudo: false
sudo: true
services:
- docker
language: go
go: go1.6
install:
- sudo add-apt-repository ppa:duggan/bats --yes
- sudo apt-get update -qq
- sudo apt-get install -qq bats
- curl -sL https://deb.nodesource.com/setup_6.x | sudo bash -
- sudo apt-get install -qqy nodejs
- sudo npm install -g npm
- sudo npm install -g azure-cli
- go get -u github.com/golang/lint/golint
before_script:
- docker version
- docker info
- azure -v
script:
- test -z "$(gofmt -s -l -w $(find . -type f -name '*.go' -not -path './vendor/*') | tee /dev/stderr)"
- test -z "$(golint . | tee /dev/stderr)"
- test -z "$(go vet -v $(go list ./... | grep -v '/vendor/') | tee /dev/stderr)"
- go list ./... | grep -v '/vendor/' | xargs go test -v -cover
- make binary
- bats integration-test/test
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ binary: clean
-ldflags "-X main.BuildDate=`date -u --rfc-3339=seconds 2> /dev/null | sed -e 's/ /T/'` \
-X main.Version=`<./VERSION` \
-X main.GitCommit=`git rev-parse --short HEAD` \
-X main.State=`if [[ -n $$(git status --porcelain) ]]; then echo 'dirty'; fi`" \
-X main.State=`if [ -n "$$(git status --porcelain)" ]; then echo 'dirty'; fi`" \
-o $(BINDIR)/$(BIN) .
clean:
rm -rf "$(BINDIR)"
Expand Down