add some test code
This commit is contained in:
parent
1cb16094f0
commit
c098b46276
|
@ -88,3 +88,5 @@ _testmain.go
|
|||
*.test
|
||||
*.prof
|
||||
|
||||
# vim swapfiles
|
||||
*.swp
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
SOURCES="."
|
||||
|
||||
if [ -n "$(gofmt -s -l $SOURCES)" ]; then
|
||||
echo "Go code is not formatted correctly with \`gofmt -s\`:"
|
||||
gofmt -s -d $SOURCES
|
||||
exit 1
|
||||
fi
|
|
@ -9,3 +9,4 @@ before_install:
|
|||
script:
|
||||
- gotestcover -coverprofile=cover.out ./...
|
||||
- $HOME/gopath/bin/goveralls -service=travis-ci -coverprofile cover.out
|
||||
- bash ./.travis.gofmt.sh
|
||||
|
|
Loading…
Reference in New Issue