Merge pull request #439 from ipfs/go-1.10

Test with Go 1.10
This commit is contained in:
Hector Sanjuan 2018-05-28 10:19:35 +02:00 committed by GitHub
commit d92751a0d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 34 deletions

View File

@ -3,7 +3,7 @@ os:
- linux
# - osx
go:
- '1.9'
- '1.10.x'
services:
- docker
@ -20,7 +20,8 @@ jobs:
- go get -u github.com/mattn/goveralls
- go get -u golang.org/x/tools/cmd/cover
- make deps
- ./coverage.sh
- go test -v -coverprofile=coverage.out -covermode=count ./...
- $HOME/gopath/bin/goveralls -coverprofile=coverage.out -service=travis-ci -repotoken $COVERALLS_TOKEN
- script:
- go get -u github.com/mattn/goveralls
- go get -u golang.org/x/tools/cmd/cover

View File

@ -1,32 +0,0 @@
#!/bin/bash
echo "mode: count" > fullcov.out
dirs=$(find ./* -maxdepth 10 -type d )
dirs=". $dirs"
for dir in $dirs;
do
if ls "$dir"/*.go &> /dev/null;
then
cmdflags="-v -coverprofile=profile.out -covermode=count $dir"
if [ "$dir" == "." ]; then
cmdflags="-v -coverprofile=profile.out -covermode=count -loglevel CRITICAL ."
fi
echo go test $cmdflags
go test $cmdflags
if [ $? -ne 0 ];
then
exit 1
fi
if [ -f profile.out ]
then
cat profile.out | grep -v "^mode: count" >> fullcov.out
fi
fi
done
if [ -n $COVERALLS_TOKEN ];
then
$HOME/gopath/bin/goveralls -coverprofile=fullcov.out -service=travis-ci -repotoken $COVERALLS_TOKEN
fi
rm -rf ./profile.out
rm -rf ./fullcov.out