Skip to content

Commit

Permalink
Enable codecov
Browse files Browse the repository at this point in the history
Change-Id: Ib3ecabe823de8a18110e4c54ac74af6df37f25c5
  • Loading branch information
mattn committed Jan 10, 2020
1 parent b194945 commit 4a8ed5b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
language: go
sudo: false
go:
- 1.13.x
- tip

os:
- linux
- osx

before_install:
- go get github.com/mattn/goveralls
- go get golang.org/x/tools/cmd/cover
- go get -t -v ./...

script:
- $HOME/gopath/bin/goveralls -repotoken 3gHdORO5k5ziZcWMBxnd9LrMZaJs8m9x5
- ./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 4a8ed5b

Please sign in to comment.