Skip to content

Commit

Permalink
Merge pull request #231 from cglewis/master
Browse files Browse the repository at this point in the history
adds codecov; closes #230
  • Loading branch information
Matt Bernier authored Dec 11, 2017
2 parents ece97af + 439248c commit 441c3bf
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,19 @@ before_script:
- go get -u github.com/alecthomas/gometalinter
- gometalinter --install
- $HOME/gopath/src/github.com/sendgrid/sendgrid-go/prism.sh

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

script:
- gometalinter --disable-all --enable=errcheck --enable=vet --enable=vetshadow --enable=megacheck
- gometalinter --disable-all --enable=errcheck --enable=vet --enable=vetshadow --enable=megacheck helpers/...
- go test -cover -v -race ./...
- ./go.test.sh
- gometalinter --disable-all --enable=errcheck --enable=vet --enable=vetshadow --enable=megacheck
- gometalinter --disable-all --enable=errcheck --enable=vet --enable=vetshadow --enable=megacheck helpers/...
- go test -cover -v -race ./...

after_success:
- bash <(curl -s https://codecov.io/bash)

notifications:
hipchat:
rooms:
Expand Down
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 441c3bf

Please sign in to comment.