Skip to content

Commit

Permalink
Merge pull request #31 from nuveo/crg_1
Browse files Browse the repository at this point in the history
Add codecov.io call to Travis file
  • Loading branch information
felipeweb committed Dec 8, 2016
2 parents 9cc30e6 + e0ac837 commit 1137179
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,7 @@ before_script:
- psql prest -c 'create table test(name text);' -U postgres

script:
- go test -v -race ./...
- sh test.sh

after_success:
- bash <(curl -s https://codecov.io/bash)
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
[![Build Status](https://travis-ci.org/nuveo/prest.svg?branch=master)](https://travis-ci.org/nuveo/prest)
[![GoDoc](https://godoc.org/github.com/nuveo/prest?status.png)](https://godoc.org/github.com/nuveo/prest)
[![Go Report Card](https://goreportcard.com/badge/github.com/nuveo/prest)](https://goreportcard.com/report/github.com/nuveo/prest)
[![codecov](https://codecov.io/gh/nuveo/prest/branch/master/graph/badge.svg)](https://codecov.io/gh/nuveo/prest)

Serve a RESTful API from any PostgreSQL database

Expand Down
1 change: 1 addition & 0 deletions coverage.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

12 changes: 12 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

set -e
echo "" > coverage.txt

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

0 comments on commit 1137179

Please sign in to comment.