Setup CI for unit tests
ahmetb opened this issue · 7 comments
ahmetb commented
Potential checks:
- go build
- go test
- go lint
- go vet
- gofmt
dgryski commented
I suggest avoiding golint as a CI test. There are false positives and not even the standard library is lint-free.
GeertJohan commented
@dgryski +1
nathany commented
May want to hold off on this because of #9. Is https://github.com/golang/crypto already tested by builders, see http://build.golang.org/?repo=golang.org%2fx%2fcrypto
dgryski commented
Depends on timeline for incorporation (if any) and effort required to add travis support (which is minimal).
ahmetb commented
Yep we're working on it it's really no big deal.
nathany commented
True. If using Travis CI, my typical .travis.yml looks like:
sudo: false
language: go
go:
- 1.4.2
os:
- linux
- osx
before_script:
- FIXED=$(go fmt ./... | wc -l); if [ $FIXED -gt 0 ]; then echo "gofmt - $FIXED file(s) not formatted correctly, please run gofmt to fix this." && exit 1; fi
script:
- go test -v ./...
notifications:
email: false
branches:
only:
- master