Merge pull request #6748 from bacongobbler/fix-6746

fix(coverage): fix usage of coverage.sh
pull/6758/head v3.0.0-beta.5
Matthew Fisher 5 years ago committed by GitHub
commit 509a8819b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -22,6 +22,6 @@ linters-settings:
gofmt: gofmt:
simplify: true simplify: true
goimports: goimports:
local-prefixes: helm.sh/helm local-prefixes: helm.sh/helm/v3
dupl: dupl:
threshold: 400 threshold: 400

@ -20,11 +20,12 @@ covermode=${COVERMODE:-atomic}
coverdir=$(mktemp -d /tmp/coverage.XXXXXXXXXX) coverdir=$(mktemp -d /tmp/coverage.XXXXXXXXXX)
profile="${coverdir}/cover.out" profile="${coverdir}/cover.out"
pushd /
hash goveralls 2>/dev/null || go get github.com/mattn/goveralls hash goveralls 2>/dev/null || go get github.com/mattn/goveralls
hash godir 2>/dev/null || go get github.com/Masterminds/godir popd
generate_cover_data() { generate_cover_data() {
for d in $(godir) ; do for d in $(go list ./...) ; do
( (
local output="${coverdir}/${d//\//-}.cover" local output="${coverdir}/${d//\//-}.cover"
go test -coverprofile="${output}" -covermode="$covermode" "$d" go test -coverprofile="${output}" -covermode="$covermode" "$d"

Loading…
Cancel
Save