Migrate to codecov.io (#2120)

* Migrate to codecov.io

* Fix data race

* Update nginx to 1.13.9
This commit is contained in:
Manuel Alejandro de Brito Fontes 2018-02-20 08:27:02 -08:00 committed by GitHub
parent 9dd5b0b023
commit 0990c5b6ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 32 additions and 14 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 /gover.coverprofile
e2e-tests e2e-tests
coverage.txt

View file

@ -13,7 +13,7 @@ notifications:
on_success: never on_success: never
go: go:
- 1.9.4 - "1.10"
go_import_path: k8s.io/ingress-nginx go_import_path: k8s.io/ingress-nginx
@ -39,9 +39,6 @@ jobs:
# start minikube # start minikube
- test/e2e/up.sh - test/e2e/up.sh
script: 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 - if ! go get github.com/jteeuwen/go-bindata/...; then github.com/jteeuwen/go-bindata/...;fi
- make cover - make cover
- stage: e2e - stage: e2e

View file

@ -149,7 +149,6 @@ verify-all:
.PHONY: test .PHONY: test
test: test:
@echo "+ $@"
@go test -v -race -tags "$(BUILDTAGS) cgo" $(shell go list ${PKG}/... | grep -v vendor | grep -v '/test/e2e') @go test -v -race -tags "$(BUILDTAGS) cgo" $(shell go list ${PKG}/... | grep -v vendor | grep -v '/test/e2e')
.PHONY: e2e-image .PHONY: e2e-image
@ -164,14 +163,21 @@ e2e-test:
.PHONY: cover .PHONY: cover
cover: cover:
@echo "+ $@" @rm -rf coverage.txt
@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 @for d in `go list ./... | grep -v vendor | grep -v '/test/e2e'`; do \
gover t=$$(date +%s); \
goveralls -coverprofile=gover.coverprofile -service travis-ci 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 .PHONY: vet
vet: vet:
@echo "+ $@"
@go vet $(shell go list ${PKG}/... | grep -v vendor) @go vet $(shell go list ${PKG}/... | grep -v vendor)
.PHONY: release .PHONY: release

View file

@ -5,7 +5,7 @@ The GCE ingress controller was moved to [github.com/kubernetes/ingress-gce](http
# NGINX Ingress Controller # NGINX Ingress Controller
[![Build Status](https://travis-ci.org/kubernetes/ingress-nginx.svg?branch=master)](https://travis-ci.org/kubernetes/ingress-nginx) [![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) [![Go Report Card](https://goreportcard.com/badge/github.com/kubernetes/ingress-nginx)](https://goreportcard.com/report/github.com/kubernetes/ingress-nginx)
## Description ## Description

View file

@ -19,7 +19,7 @@ set -o errexit
set -o nounset set -o nounset
set -o pipefail set -o pipefail
export NGINX_VERSION=1.13.8 export NGINX_VERSION=1.13.9
export NDK_VERSION=0.3.0 export NDK_VERSION=0.3.0
export VTS_VERSION=0.1.15 export VTS_VERSION=0.1.15
export SETMISC_VERSION=0.31 export SETMISC_VERSION=0.31
@ -110,7 +110,7 @@ mkdir --verbose -p "$BUILD_PATH"
cd "$BUILD_PATH" cd "$BUILD_PATH"
# download, verify and extract the source files # download, verify and extract the source files
get_src 8410b6c31ff59a763abf7e5a5316e7629f5a5033c95a3a0ebde727f9ec8464c5 \ get_src 5faea18857516fe68d30be39c3032bd22ed9cf85e1a6fdf32e3721d96ff7fa42 \
"http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz" "http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz"
get_src 88e05a99a8a7419066f5ae75966fb1efc409bad4522d14986da074554ae61619 \ get_src 88e05a99a8a7419066f5ae75966fb1efc409bad4522d14986da074554ae61619 \

View file

@ -42,6 +42,8 @@ import (
"k8s.io/client-go/util/flowcontrol" "k8s.io/client-go/util/flowcontrol"
"k8s.io/kubernetes/pkg/util/filesystem" "k8s.io/kubernetes/pkg/util/filesystem"
"path/filepath"
"k8s.io/ingress-nginx/internal/file" "k8s.io/ingress-nginx/internal/file"
"k8s.io/ingress-nginx/internal/ingress" "k8s.io/ingress-nginx/internal/ingress"
"k8s.io/ingress-nginx/internal/ingress/annotations" "k8s.io/ingress-nginx/internal/ingress/annotations"
@ -56,7 +58,6 @@ import (
"k8s.io/ingress-nginx/internal/net/ssl" "k8s.io/ingress-nginx/internal/net/ssl"
"k8s.io/ingress-nginx/internal/task" "k8s.io/ingress-nginx/internal/task"
"k8s.io/ingress-nginx/internal/watch" "k8s.io/ingress-nginx/internal/watch"
"path/filepath"
) )
type statusModule string type statusModule string
@ -191,6 +192,10 @@ Error loading new template : %v
filesToWatch := []string{} filesToWatch := []string{}
err := filepath.Walk("/etc/nginx/geoip/", func(path string, info os.FileInfo, err error) error { err := filepath.Walk("/etc/nginx/geoip/", func(path string, info os.FileInfo, err error) error {
if err != nil {
return err
}
if info.IsDir() { if info.IsDir() {
return nil return nil
} }