Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds codecov; closes #230 #231

Merged
merged 5 commits into from
Dec 11, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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