Skip to content
Permalink
Browse files

Add codecov

  • Loading branch information
deletescape committed Oct 18, 2019
1 parent a0993c8 commit e010e402c0da55f276aadd16aae99892023a8fdf
Showing with 23 additions and 1 deletion.
  1. +10 −1 .travis.yml
  2. +1 −0 README.md
  3. +12 −0 test.sh
@@ -9,4 +9,13 @@ go:
env:
global:
- GOPROXY=https://proxy.golang.org
- GO111MODULE=on
- GO111MODULE=on

before_script:
- chmod +x test.sh

script:
- ./test.sh

after_success:
- bash <(curl -s https://codecov.io/bash)
@@ -5,6 +5,7 @@
[![GoDoc](https://godoc.org/github.com/dogbin/inu/dogbin?status.svg)](https://godoc.org/github.com/dogbin/inu/dogbin)
[![Go Report Card](https://goreportcard.com/badge/github.com/dogbin/inu)](https://goreportcard.com/report/github.com/dogbin/inu)
[![Build Status](https://travis-ci.com/dogbin/inu.svg?branch=master)](https://travis-ci.com/dogbin/inu)
[![Code Coverage](https://img.shields.io/codecov/c/github/dogbin/inu)](https://codecov.io/gh/dogbin/inu/)

## Installation:

12 test.sh
@@ -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 e010e40

Please sign in to comment.
You can’t perform that action at this time.