Skip to content

Commit

Permalink
add test.sh and update travis config file.
Browse files Browse the repository at this point in the history
  • Loading branch information
crgimenes committed Dec 8, 2016
1 parent f8e8092 commit db47fbf
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ before_script:
- psql prest -c 'create table test(name text);' -U postgres

script:
- go test -v -race ./... -coverprofile=coverage.txt -covermode=atomic
- sh test.sh

after_success:
- bash <(curl -s https://codecov.io/bash)
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 db47fbf

Please sign in to comment.