Skip to content

Commit

Permalink
add coverage generation in CI
Browse files Browse the repository at this point in the history
use doecov for serve coverages
  • Loading branch information
diginatu committed Apr 25, 2018
1 parent 3069d17 commit fda615b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ nagome
*.exe
*.test
*.prof
coverage.txt
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ script:
- golint ./...
- go vet ./...
- make test
- make coverage

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

notifications:
slack:
Expand Down
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,14 @@ clean:
.PHONY: test
test:
go test -v -race $(GOPACKAGES)

.PHONY: coverage
coverage:
echo "" > coverage.txt
for d in $(GOPACKAGES); do \
go test -coverprofile=profile.out -covermode=atomic "$$d"; \
if [ -f profile.out ]; then \
cat profile.out >> coverage.txt; \
rm profile.out; \
fi \
done
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Nagome

[![GoDoc](https://godoc.org/github.com/diginatu/nagome?status.svg)](https://godoc.org/github.com/diginatu/nagome)
[![Build Status](https://travis-ci.org/diginatu/nagome.svg?branch=master)](https://travis-ci.org/diginatu/nagome)
[![codecov](https://codecov.io/gh/diginatu/nagome/branch/master/graph/badge.svg)](https://codecov.io/gh/diginatu/nagome)

Advanced NicoLive Comment Viewer written in go.

Expand Down

0 comments on commit fda615b

Please sign in to comment.