瀏覽代碼

Add the coverage stats and badge

Vadim Markovtsev 7 年之前
父節點
當前提交
6db8065cdb
共有 2 個文件被更改,包括 5 次插入2 次删除
  1. 4 1
      .travis.yml
  2. 1 1
      README.md

+ 4 - 1
.travis.yml

@@ -7,7 +7,10 @@ go:
 go_import_path: gopkg.in/src-d/hercules.v2
   
 script:
-  - go test -v -cpu=1,2 ./...
+  - go test -v -cpu=1,2 -coverprofile=coverage.txt -covermode=count gopkg.in/src-d/hercules.v2
+
+after_success:
+  - bash <(curl -s https://codecov.io/bash)
 
 notifications:
   email: false

+ 1 - 1
README.md

@@ -1,4 +1,4 @@
-Hercules [![Build Status](https://travis-ci.org/src-d/hercules.svg?branch=master)](https://travis-ci.org/src-d/hercules)
+Hercules [![Build Status](https://travis-ci.org/src-d/hercules.svg?branch=master)](https://travis-ci.org/src-d/hercules) [![codecov](https://codecov.io/github/src-d/hercules/coverage.svg)](https://codecov.io/gh/src-d/hercules)
 --------
 
 This project calculates and plots the lines burndown and other fun stats in Git repositories.