test: testing use of codecov.io for code coverage reporting
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
parent
87251497af
commit
69bba81747
|
@ -17,7 +17,6 @@ before_install:
|
|||
- sudo apt-get install --force-yes libcv-dev libcvaux-dev libhighgui-dev libopencv-dev libsdl2-dev libsdl2-image-dev libsdl2 libusb-dev xvfb unzip libgtk2.0-0
|
||||
- cd $HOME/gopath/src/gobot.io/x/gobot
|
||||
- go get github.com/axw/gocov/gocov
|
||||
- go get github.com/mattn/goveralls
|
||||
- if ! go get github.com/golang/tools/cmd/cover; then go get golang.org/x/tools/cmd/cover; fi
|
||||
install:
|
||||
- make deps
|
||||
|
@ -26,7 +25,10 @@ before_script:
|
|||
- sh -e /etc/init.d/xvfb start
|
||||
script:
|
||||
- ./ci/travis.sh
|
||||
after_success:
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
branches:
|
||||
except:
|
||||
- gobot.io
|
||||
- /^gobot-.*$/
|
||||
secure: "HggklzWOwKqImvjQe1yvojCoTaUBDrOVXRjsrZaoTaKpUtmho1tpCMtKF1dbyT0T5Y68P6f9e/XyANWVeziJNZ+YmNkY+CNdNYHiNnpl8att3MuL4hpwKDPAqLK8H2G+71j3O/rBvf6oIJHtSEesR5Sbb+2fSmhNFtLrDgp5FZA="
|
||||
|
|
15
ci/travis.sh
15
ci/travis.sh
|
@ -2,8 +2,8 @@
|
|||
PACKAGES=('gobot' 'gobot/api' 'gobot/sysfs' 'gobot/drivers/gpio' 'gobot/drivers/aio' 'gobot/drivers/i2c' 'gobot/platforms/firmata/client' 'gobot/platforms/intel-iot/edison' 'gobot/platforms/intel-iot/joule' 'gobot/platforms/parrot/ardrone' 'gobot/platforms/parrot/bebop' 'gobot/platforms/parrot/minidrone' 'gobot/platforms/sphero/ollie' 'gobot/platforms/sphero/bb8' $(ls ./platforms | sed -e 's/^/gobot\/platforms\//'))
|
||||
EXITCODE=0
|
||||
|
||||
echo "mode: set" > profile.cov
|
||||
touch tmp.cov
|
||||
echo "" > coverage.txt
|
||||
|
||||
for package in "${PACKAGES[@]}"
|
||||
do
|
||||
go test -a -coverprofile=tmp.cov gobot.io/x/$package
|
||||
|
@ -11,13 +11,6 @@ do
|
|||
then
|
||||
EXITCODE=1
|
||||
fi
|
||||
cat tmp.cov | grep -v "mode: set" >> profile.cov
|
||||
cat tmp.cov >> coverage.txt
|
||||
rm tmp.cov
|
||||
done
|
||||
|
||||
if [ $EXITCODE -ne 0 ]
|
||||
then
|
||||
exit $EXITCODE
|
||||
fi
|
||||
|
||||
export PATH=$PATH:$HOME/gopath/bin/
|
||||
goveralls -v -coverprofile=profile.cov -service=travis-ci -repotoken=sFrR9ZmLP5FLc34lOaqir67RPzYOvFPUB
|
||||
|
|
Loading…
Reference in New Issue