2017-09-02 12:49:49 -05:00
|
|
|
#!/bin/bash
|
2019-05-04 11:18:06 +03:00
|
|
|
PKG=github.com/unidoc/unioffice
|
2017-09-02 14:05:16 -05:00
|
|
|
ALLPKGS=`go list $PKG/... | grep -iv schema`
|
2017-09-02 12:49:49 -05:00
|
|
|
|
|
|
|
cd $GOPATH/src/$PKG
|
|
|
|
echo "Prebuilding"
|
|
|
|
go build -i $PKG/...
|
|
|
|
go test -i $PKG/...
|
|
|
|
|
|
|
|
echo -e "mode: atomic" > coverage.txt
|
|
|
|
echo "Running tests"
|
|
|
|
for pkg in $ALLPKGS; do
|
|
|
|
echo $pkg
|
|
|
|
go test -coverprofile=coverprofile -covermode=atomic $pkg
|
|
|
|
if [ -f coverprofile ]; then
|
|
|
|
tail -n+2 coverprofile >> coverage.txt
|
|
|
|
rm coverprofile
|
|
|
|
fi
|
|
|
|
done
|
2017-09-22 20:26:41 -05:00
|
|
|
rm coverage.out coverage.txte
|
2017-09-02 15:58:43 -05:00
|
|
|
bash <(curl -s https://codecov.io/bash)
|