From 7bf381fd33be556535bfcdea65b922cc9472843d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Grumb=C3=B6ck?= Date: Fri, 28 Aug 2020 13:00:53 +0000 Subject: [PATCH 1/5] Fixes coverall, #1755 --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 183db13b26..2af7c33145 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,10 +35,10 @@ jobs: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.30.0 make lint - - name: Coverage - uses: shogo82148/actions-goveralls@v1 - - name: Test - run: make test - + run: go test -race -coverprofile=profile.cov ./... + - name: Send coverage + uses: shogo82148/actions-goveralls@v1 + with: + path-to-profile: profile.cov From 5eceb08ced5f5f2f88dd08c3b8cd4ec125066f08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Grumb=C3=B6ck?= Date: Fri, 28 Aug 2020 13:09:06 +0000 Subject: [PATCH 2/5] Updated CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 33693d7ac3..44bf8aad24 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - Fix: alibaba cloud keeping create record (#1682) @LXM - Update all container registry references to use k8s.gcr.io @seanmalloy - Provide available prometheus metrics in documentation @vinny-sabatini +- Fixes test coverage with coveralls (#1755) @jgrumboe ## v0.7.3 - 2020-08-05 From 541c22e72c73cfb82223f998491d17845d95c814 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Grumb=C3=B6ck?= Date: Fri, 28 Aug 2020 13:00:53 +0000 Subject: [PATCH 3/5] Fixes coverall, #1755 --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 183db13b26..2af7c33145 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,10 +35,10 @@ jobs: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.30.0 make lint - - name: Coverage - uses: shogo82148/actions-goveralls@v1 - - name: Test - run: make test - + run: go test -race -coverprofile=profile.cov ./... + - name: Send coverage + uses: shogo82148/actions-goveralls@v1 + with: + path-to-profile: profile.cov From 26f2badfc99b0ca73e680343fd286ecba18c3bf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Grumb=C3=B6ck?= Date: Fri, 28 Aug 2020 13:09:06 +0000 Subject: [PATCH 4/5] Updated CHANGELOG because of rebasing --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 124393767c..663b52b160 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - Update all container registry references to use k8s.gcr.io @seanmalloy - Provide available prometheus metrics in documentation @vinny-sabatini - Fix index out of range when hostname has no dots (#1756) @chemasan +- Fixes test coverage with coveralls (#1755) @jgrumboe ## v0.7.3 - 2020-08-05 From 6f5ef2a56d46ad9b87300de4843df424f41ebbf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Grumb=C3=B6ck?= Date: Tue, 1 Sep 2020 06:30:29 +0000 Subject: [PATCH 5/5] Moved coverprofile creation into Makefile --- .github/workflows/ci.yml | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2af7c33145..6bb602edcf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,7 @@ jobs: make lint - name: Test - run: go test -race -coverprofile=profile.cov ./... + run: make test - name: Send coverage uses: shogo82148/actions-goveralls@v1 diff --git a/Makefile b/Makefile index 06f6bea344..8f09d6c855 100644 --- a/Makefile +++ b/Makefile @@ -56,7 +56,7 @@ lint: licensecheck go-lint .PHONY: verify test test: - go test -race ./... + go test -race -coverprofile=profile.cov ./... # The build targets allow to build the binary and docker image .PHONY: build build.docker build.mini