hybridgroup.gobot/scripts/travis.sh

24 lines
609 B
Bash
Raw Normal View History

2014-07-23 00:16:54 +08:00
#!/bin/bash
2014-10-31 07:06:04 +08:00
PACKAGES=('gobot' 'gobot/api' 'gobot/platforms/intel-iot/edison' 'gobot/sysfs' $(ls ./platforms | sed -e 's/^/gobot\/platforms\//'))
2014-07-23 00:16:54 +08:00
EXITCODE=0
echo "mode: count" > profile.cov
touch tmp.cov
for package in "${PACKAGES[@]}"
do
go test -covermode=count -coverprofile=tmp.cov github.com/hybridgroup/$package
if [ $? -ne 0 ]
then
EXITCODE=1
fi
cat tmp.cov | grep -v "mode: count" >> profile.cov
done
if [ $EXITCODE -ne 0 ]
then
exit $EXITCODE
fi
export PATH=$PATH:$HOME/gopath/bin/
goveralls -coverprofile=profile.cov -service=travis-ci -repotoken=sFrR9ZmLP5FLc34lOaqir67RPzYOvFPUB