Fix testing in travisci.

This commit is contained in:
Andrey Petrov 2016-07-25 12:20:10 -04:00
parent f0db74c874
commit 385340af8a
2 changed files with 22 additions and 10 deletions

View File

@ -1,15 +1,25 @@
language: go
notifications:
email: false
install:
- export PATH=$PATH:$HOME/gopath/bin
- make deps
script:
# TODO: Bring this back: - fgt golint
- make test
language: go
go:
- 1.6.2
- tip
env:
- CGO_ENABLED=0
install:
- go get -t ./...
- go get github.com/golang/lint/golint
- go get github.com/gordonklaus/ineffassign
script:
- diff <(echo -n) <(gofmt -s -d .)
- ineffassign .
- go vet ./...
- go test $(go list ./... | grep -v /vendor/)
after_script:
- golint ./...

View File

@ -6,6 +6,8 @@ SRCS = %.go
VERSION := $(shell git describe --tags --dirty --always)
LDFLAGS = LDFLAGS="-X main.Version=$(VERSION)"
SUBPACKAGES := $(shell go list ./... | grep -v /vendor/)
all: $(BINARY)
$(BINARY): deps **/**/*.go **/*.go *.go
@ -29,7 +31,7 @@ debug: $(BINARY) $(KEY)
./$(BINARY) --pprof 6060 -i $(KEY) --bind ":$(PORT)" -vv
test:
go test -v ./...
go test -v $(SUBPACKAGES)
release:
GOOS=linux GOARCH=arm GOARM=6 $(LDFLAGS) ./build_release "github.com/shazow/ssh-chat/cmd/ssh-chat" README.md LICENSE