Skip to content

Commit

Permalink
Add coveralls badge and update coveralls token.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pawan Rawal committed Sep 6, 2017
1 parent 666d5b7 commit 59b1951
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ notifications:

env:
global:
- secure: csSzCUQcVLEJvcBgdj0E7vVJo60hx5uUzCFEvHcT/pxRQ49EA7lWUm1E1+zfDTGpV3DjKT8Bx+FNUR7sBesnaYMU1JD3KMR0gjbxLahi/nkcn17XKKG45oLetQXUO4ATk9KrJHr7n3jYKD18hOhRYPwzIyT3BwFhU5bGUlVvCwEfns79CktSYyC4FvSMYAmuLwR7DN0xnb8gghreaZKQg+3162SAhtjRcr3yhaXeulFrDY2O5uEG+fPmusd/pGi/mD3AG7gqUGbi2a1v+Cu0ZOQzpwytvwb4+bRh9z3toPDMLsm2hKEffqWcK2vimQwBswRmCDxd4E9NEqvoV6B1AmVzYTVrVzyUt4sgUnfTtO1C77ju9Qc/fP6kFFMmsj8ub7akwYy5mJ1e/3girrvRNs+zg189GeHWNe5Xh81IiFJTWKHcizweyI2GHpcAv6/RVN+cvhDxY08eeYEj0NZYDmXZAGzYgYTZwrrLha6Q5KAfAm3MbJWVHzd5QDfiXodgw64fizgt1LGE5TsLQaUHHQWTRIt3dpXwSExnIdp1hs5tX3OlHimd6WD2eScyLptPVKvwxmHHPW1QJZcdHcfLgkhWKDslqeTuYMkJehFdyX85lPw7CO7diR5xnk74ExPxmPVw++0x51r2nhaKgPHBaA7VGqHZvqJ16130SN6jW8Q=
- secure: CRkV2+/jlO0gXzzS50XGxfMS117FNwiVjxNY/LeWq06RKD+dDCPxTJl3JCNe3l0cYEPAglV2uMMYukDiTqJ7e+HI4nh4N4mv6lwx39N8dAvJe1x5ITS2T4qk4kTjuQb1Q1vw/ZOxoQqmvNKj2uRmBdJ/HHmysbRJ1OzCWML3OXdUwJf0AYlJzTjpMfkOKr7sTtE4rwyyQtd4tKH1fGdurgI9ZuFd9qvYxK2qcJhsQ6CNqMXt+7FkVkN1rIPmofjjBTNryzUr4COFXuWH95aDAif19DeBW4lbNgo1+FpDsrgmqtuhl6NAuptI8q/imow2KXBYJ8JPXsxW8DVFj0IIp0RCd3GjaEnwBEbxAyiIHLfW7AudyTS/dJOvZffPqXnuJ8xj3OPIdNe4xY0hWl8Ju2HhKfLOAHq7VadHZWd3IHLil70EiL4/JLD1rNbMImUZisFaA8pyrcIvYYebjOnk4TscwKFLedClRSX1XsMjWWd0oykQtrdkHM2IxknnBpaLu7mFnfE07f6dkG0nlpyu4SCLey7hr5FdcEmljA0nIxTSYDg6035fQkBEAbe7hlESOekkVNT9IZPwG+lmt3vU4ofi6NqNbJecOuSB+h36IiZ9s4YQtxYNnLgW14zjuFGGyT5smc3IjBT7qngDjKIgyrSVoRkY/8udy9qbUgvBeW8=

before_script:
- go get github.com/mattn/goveralls
script:
- go test -v -covermode=count -coverprofile=coverage.out
- bash contrib/cover.sh $HOME/build coverage.out || travis_terminate 1
- goveralls -service=travis-ci -coverprofile=coverage.out || true
- goveralls -coverprofile=coverage.out -service=travis-ci
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Badger [![GoDoc](https://godoc.org/github.com/dgraph-io/badger?status.svg)](https://godoc.org/github.com/dgraph-io/badger) [![Go Report Card](https://goreportcard.com/badge/github.com/dgraph-io/badger)](https://goreportcard.com/report/github.com/dgraph-io/badger) [![Build Status](https://travis-ci.org/dgraph-io/badger.svg?branch=master)](https://travis-ci.org/dgraph-io/badger) ![Appveyor](https://ci.appveyor.com/api/projects/status/github/dgraph-io/badger?branch=master&svg=true)
# Badger [![GoDoc](https://godoc.org/github.com/dgraph-io/badger?status.svg)](https://godoc.org/github.com/dgraph-io/badger) [![Go Report Card](https://goreportcard.com/badge/github.com/dgraph-io/badger)](https://goreportcard.com/report/github.com/dgraph-io/badger) [![Build Status](https://travis-ci.org/dgraph-io/badger.svg?branch=master)](https://travis-ci.org/dgraph-io/badger) ![Appveyor](https://ci.appveyor.com/api/projects/status/github/dgraph-io/badger?branch=master&svg=true) [![Coverage Status](https://coveralls.io/repos/github/dgraph-io/badger/badge.svg?branch=master)](https://coveralls.io/github/dgraph-io/badger?branch=master)

An embeddable, persistent, simple and fast key-value (KV) store, written purely in Go. It's meant to be a performant alternative to non Go based key-value stores like [RocksDB](https://github.com/facebook/rocksdb).

Expand Down
20 changes: 20 additions & 0 deletions contrib/cover.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

SRC="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/.."
TMP=$(mktemp /tmp/badger-coverage-XXXXX.txt)

BUILD=$1
OUT=$2

set -e

pushd $SRC &> /dev/null

# create coverage output
echo 'mode: atomic' > $OUT
for PKG in $(go list ./...|grep -v -E 'vendor'); do
go test -covermode=atomic -coverprofile=$TMP $PKG
tail -n +2 $TMP >> $OUT
done

popd &> /dev/null

0 comments on commit 59b1951

Please sign in to comment.