From c8ce3ec7aed8daf107a5a857a8b12af7d88c9e4c Mon Sep 17 00:00:00 2001 From: Phodal Huang Date: Fri, 20 Dec 2019 20:41:34 +0800 Subject: [PATCH] ci: add coverage --- .travis.yml | 21 ++++++++++++++++----- README.md | 2 ++ 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 471c9b9..998c9e4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,10 +6,21 @@ go: env: GO111MODULE=on GOFLAGS='-mod vendor' -install: - - go build - - go install github.com/onsi/ginkgo/ginkgo - - export PATH=$PATH:$HOME/gopath/bin +before_install: + - go get github.com/onsi/gomega + - go get github.com/onsi/ginkgo/ginkgo + - go get github.com/modocache/gover -script: $HOME/gopath/bin/ginkgo -r --randomizeAllSpecs --randomizeSuites --race --trace && go vet +git: + depth: 1 +install: true + +script: + - ginkgo -r --randomizeAllSpecs --randomizeSuites --failOnPending --coverpkg gitserver --trace --race --compilers=2 + +after_success: + - gover . coverage.txt + - ls -al + - cat coverage.txt + - bash <(curl -s https://codecov.io/bash) diff --git a/README.md b/README.md index 28ded6a..674063d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Coca +[![Build Status](https://travis-ci.org/phodal/coca.svg?branch=master)](https://travis-ci.org/phodal/coca) + > Coca 是一个用于遗留系统重构的瑞士军刀。它可以分析代码中的 badsmell,行数统计,分析调用与依赖,进行 Git 分析,以及自动化重构等。 ## Usage -- GitLab