Skip to content

Commit

Permalink
Migrate to codecov.io
Browse files Browse the repository at this point in the history
  • Loading branch information
aledbf committed Feb 20, 2018
1 parent 9dd5b0b commit 0a7417c
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 11 deletions.
8 changes: 8 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
coverage:
status:
project:
default:
target: 40%
threshold: null
patch: false
changes: false
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@ Session.vim
/gover.coverprofile

e2e-tests

coverage.txt
5 changes: 1 addition & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ notifications:
on_success: never

go:
- 1.9.4
- "1.10"

go_import_path: k8s.io/ingress-nginx

Expand All @@ -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
Expand Down
18 changes: 12 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0a7417c

Please sign in to comment.