From 3c312b9bbdf1bcce8c65bf3ac77fdae95d600038 Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Fri, 1 May 2020 16:54:09 -0700 Subject: [PATCH] github: Fix go test coverage report The go test coverage report does not cover other packages unless you list them with the -coverpkg= argument. This results in an incomplete coverage report with oddly missing lines. This commit lists all of the packages so that they will all be included when running the tests and gathering the results. --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4fdab0f98..ff3bddcde 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -44,7 +44,7 @@ jobs: run: $(go env GOPATH)/bin/golangci-lint run - name: Run unit tests - run: go test -v -race -covermode atomic -coverprofile=coverage.txt ./... + run: go test -v -race -covermode=atomic -coverprofile=coverage.txt -coverpkg=./... ./... - name: Send coverage to codecov.io run: bash <(curl -s https://codecov.io/bash)