Migrate to codecov.io

This commit is contained in:
Manuel de Brito Fontes 2018-02-20 11:06:14 -03:00
parent 9dd5b0b023
commit 0a7417c3cc
No known key found for this signature in database
GPG key ID: 786136016A8BA02A
5 changed files with 24 additions and 11 deletions

8
.codecov.yml Normal file
View file

@ -0,0 +1,8 @@
coverage:
status:
project:
default:
target: 40%
threshold: null
patch: false
changes: false

2
.gitignore vendored
View file

@ -30,3 +30,5 @@ Session.vim
/gover.coverprofile
e2e-tests
coverage.txt

View file

@ -13,7 +13,7 @@ notifications:
on_success: never
go:
- 1.9.4
- "1.10"
go_import_path: k8s.io/ingress-nginx
@ -39,9 +39,6 @@ jobs:
# start minikube
- test/e2e/up.sh
script:
- go get github.com/mattn/goveralls
- go get github.com/modocache/gover
- if ! go get github.com/golang/tools/cmd/cover; then go get golang.org/x/tools/cmd/cover;fi
- if ! go get github.com/jteeuwen/go-bindata/...; then github.com/jteeuwen/go-bindata/...;fi
- make cover
- stage: e2e

View file

@ -149,7 +149,6 @@ verify-all:
.PHONY: test
test:
@echo "+ $@"
@go test -v -race -tags "$(BUILDTAGS) cgo" $(shell go list ${PKG}/... | grep -v vendor | grep -v '/test/e2e')
.PHONY: e2e-image
@ -164,14 +163,21 @@ e2e-test:
.PHONY: cover
cover:
@echo "+ $@"
@go list -f '{{if len .TestGoFiles}}"go test -coverprofile={{.Dir}}/.coverprofile {{.ImportPath}}"{{end}}' $(shell go list ${PKG}/... | grep -v vendor | grep -v '/test/e2e') | xargs -L 1 sh -c
gover
goveralls -coverprofile=gover.coverprofile -service travis-ci
@rm -rf coverage.txt
@for d in `go list ./... | grep -v vendor | grep -v '/test/e2e'`; do \
t=$$(date +%s); \
go test -coverprofile=cover.out -covermode=atomic $$d || exit 1; \
echo "Coverage test $$d took $$(($$(date +%s)-t)) seconds"; \
if [ -f cover.out ]; then \
cat cover.out >> coverage.txt; \
rm cover.out; \
fi; \
done
@echo "Uploading coverage results..."
@curl -s https://codecov.io/bash | bash
.PHONY: vet
vet:
@echo "+ $@"
@go vet $(shell go list ${PKG}/... | grep -v vendor)
.PHONY: release

View file

@ -5,7 +5,7 @@ The GCE ingress controller was moved to [github.com/kubernetes/ingress-gce](http
# NGINX Ingress Controller
[![Build Status](https://travis-ci.org/kubernetes/ingress-nginx.svg?branch=master)](https://travis-ci.org/kubernetes/ingress-nginx)
[![Coverage Status](https://coveralls.io/repos/github/kubernetes/ingress-nginx/badge.svg?branch=master)](https://coveralls.io/github/kubernetes/ingress-nginx?branch=master)
[![Coverage Status](https://codecov.io/gh/kubernetes/ingress-nginx/branch/master/graph/badge.svg)](https://codecov.io/gh/kubernetes/ingress-nginx)
[![Go Report Card](https://goreportcard.com/badge/github.com/kubernetes/ingress-nginx)](https://goreportcard.com/report/github.com/kubernetes/ingress-nginx)
## Description