From 42405ac657d0ce81ff5647f8f24b5dbf3590e32f Mon Sep 17 00:00:00 2001 From: Christophe de Carvalho Date: Thu, 23 Apr 2020 10:35:36 +0200 Subject: [PATCH] remove coverage tracking --- .github/workflows/test.yaml | 10 +--------- pkg/Makefile | 13 ++++--------- pkg/buildscripts/go-coverage.sh | 13 ------------- 3 files changed, 5 insertions(+), 31 deletions(-) delete mode 100644 pkg/buildscripts/go-coverage.sh diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 71874fce8..4c1d6f25d 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -25,18 +25,10 @@ jobs: - name: Run tests run: | cd pkg - make coverage + make testrace env: GO111MODULE: on - - name: Send coverage - if: success() - run: | - cd pkg - bash <(curl -s https://codecov.io/bash) - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - - name: Build binaries run: | cd cmds diff --git a/pkg/Makefile b/pkg/Makefile index 94113338a..467a7ddc8 100644 --- a/pkg/Makefile +++ b/pkg/Makefile @@ -1,8 +1,5 @@ PWD := $(shell pwd) GOPATH := $(shell go env GOPATH) -# LDFLAGS := $(shell go run buildscripts/gen-ldflags.go) - -# BUILD_LDFLAGS := '$(LDFLAGS)' all: build @@ -45,7 +42,6 @@ spelling: static: go run honnef.co/go/tools/cmd/staticcheck -- ./... -# Builds minio, runs the verifiers then runs the tests. check: test test: verifiers build # we already ran vet separately, so safe to turn it off here @@ -55,12 +51,11 @@ test: verifiers build done testrace: verifiers build - @echo "Running unit tests with GOFLAGS=${GOFLAGS}" # we already ran vet separately, so safe to turn it off here - @CGO_ENABLED=1 go test -v -vet=off -race ./... - -coverage: verifiers build - @(env bash $(PWD)/buildscripts/go-coverage.sh) + @echo "Running unit tests with GOFLAGS=${GOFLAGS}" + for pkg in $(shell go list ./... | grep -Ev "stubs|network" ); do \ + go test -v -vet=off -race $$pkg; \ + done generate: @echo "Generating modules client stubs" diff --git a/pkg/buildscripts/go-coverage.sh b/pkg/buildscripts/go-coverage.sh deleted file mode 100644 index 479f1bb68..000000000 --- a/pkg/buildscripts/go-coverage.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash - -set -e -echo "" > coverage.txt - -for d in $(go list ./... | grep -Ev "stubs|network" ); do - echo "test $d" - go test -vet=off -coverprofile=profile.out -race -covermode=atomic "$d" - if [ -f profile.out ]; then - cat profile.out >> coverage.txt - rm profile.out - fi -done \ No newline at end of file