Skip to content

Commit

Permalink
Add travis.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
tamalsaha committed Mar 13, 2018
1 parent d6f479b commit 2990dc1
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .travis.yml
@@ -0,0 +1,13 @@
language: go
go:
- 1.x
- tip

install: true

script:
- go build ./...
- ./hack/coverage.sh

after_success:
- bash <(curl -s https://codecov.io/bash)
19 changes: 19 additions & 0 deletions hack/coverage.sh
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
set -eou pipefail

GOPATH=$(go env GOPATH)
REPO_ROOT="$GOPATH/src/github.com/appscode/guard"

pushd $REPO_ROOT

echo "" > coverage.txt

for d in $(go list ./... | grep -v vendor); do
go test -v -race -coverprofile=profile.out -covermode=atomic "$d"
if [ -f profile.out ]; then
cat profile.out >> coverage.txt
rm profile.out
fi
done

popd

0 comments on commit 2990dc1

Please sign in to comment.