Skip to content

Commit

Permalink
coverage test
Browse files Browse the repository at this point in the history
  • Loading branch information
trumae committed Jan 26, 2018
1 parent 11b108c commit b3ac604
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*~
coverage.txt
cmds/valente/valente
cmds/statusvalente/statusvalente
*.swp
Expand Down
14 changes: 14 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
language: go
sudo: false
go:
- 1.8.x
- tip

before_install:
- go get -t -v ./...

script:
- ./go.test.sh

after_success:
- bash <(curl -s https://codecov.io/bash)
12 changes: 12 additions & 0 deletions go.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 b3ac604

Please sign in to comment.