diff --git a/.gitignore b/.gitignore index 30ec78267..3b25db0a3 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,5 @@ vendor/**/*.js vendor/**/*.json release .DS_Store -*.syso \ No newline at end of file +*.syso +coverage.out \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 896f39878..98e78227c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,8 +13,11 @@ env: - ARCH=i686 script: -- make test - make test GOFLAGS="-race" +- make coverage + +after_success: +- bash <(curl -s https://codecov.io/bash) after_success: - bash <(curl -s https://codecov.io/bash) diff --git a/Makefile b/Makefile index 465c216cc..eb3b7d1bc 100644 --- a/Makefile +++ b/Makefile @@ -109,6 +109,10 @@ test: build @GO15VENDOREXPERIMENT=1 go test $(GOFLAGS) . @GO15VENDOREXPERIMENT=1 go test $(GOFLAGS) github.com/minio/minio/pkg... +coverage: build + @echo "Running all coverage for minio:" + @GO15VENDOREXPERIMENT=1 ./buildscripts/go-coverage.sh + gomake-all: build @echo "Installing minio:" @GO15VENDOREXPERIMENT=1 go build --ldflags $(BUILD_LDFLAGS) -o $(GOPATH)/bin/minio diff --git a/README.md b/README.md index fa2b74969..0e8116f1c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Minio Quickstart Guide [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/minio/minio?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +# Minio Quickstart Guide [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/minio/minio?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![codecov](https://codecov.io/gh/minio/minio/branch/master/graph/badge.svg)](https://codecov.io/gh/minio/minio) Minio is an object storage server released under Apache License v2.0. It is compatible with Amazon S3 cloud storage service. It is best suited for storing unstructured data such as photos, videos, log files, backups and container / VM images. Size of an object can range from a few KBs to a maximum of 5TB. diff --git a/appveyor.yml b/appveyor.yml index 1487865b6..eb59b0f11 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -22,14 +22,15 @@ install: # to run your custom scripts instead of automatic MSBuild build_script: - - go test . - go test -race . - - go test github.com/minio/minio/pkg... - go test -race github.com/minio/minio/pkg... - go run buildscripts/gen-ldflags.go > temp.txt - set /p BUILD_LDFLAGS= coverage.txt + +for d in $(go list ./... | grep -v vendor); do + go test -coverprofile=profile.out -covermode=atomic $d + if [ -f profile.out ]; then + cat profile.out >> coverage.txt + rm profile.out + fi +done