From ed7c51c9c9c1fa6baed308dc73f6d1d78a4756a2 Mon Sep 17 00:00:00 2001 From: Eric Date: Mon, 20 Nov 2023 17:01:19 -0600 Subject: [PATCH] Add `--coverpkg` flag to go test in the Makefile (#15153) Related to: #10209 Changes: - Updated the go test in the Makefile to have the `--codepkg` flag. - Added a newline to the `test-go` GH workflow to trigger a run for this PR > Note: I'm creating this as a draft PR to see the results of the "Test Go" workflow --- .github/workflows/test-go.yaml | 1 + Makefile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-go.yaml b/.github/workflows/test-go.yaml index 99d2886c21..eb2dcb8232 100644 --- a/.github/workflows/test-go.yaml +++ b/.github/workflows/test-go.yaml @@ -87,6 +87,7 @@ jobs: done echo "mysql is ready" + - name: Run Go Tests run: | GO_TEST_EXTRA_FLAGS="-v -race=$RACE_ENABLED -timeout=$GO_TEST_TIMEOUT" \ diff --git a/Makefile b/Makefile index 6fef8844d7..f7828496bd 100644 --- a/Makefile +++ b/Makefile @@ -138,7 +138,7 @@ dump-test-schema: go run ./tools/dbutils ./server/datastore/mysql/schema.sql test-go: dump-test-schema generate-mock - go test -tags full,fts5,netgo ${GO_TEST_EXTRA_FLAGS_VAR} -parallel 8 -coverprofile=coverage.txt -covermode=atomic ./cmd/... ./ee/... ./orbit/pkg/... ./orbit/cmd/orbit ./pkg/... ./server/... ./tools/... + go test -tags full,fts5,netgo ${GO_TEST_EXTRA_FLAGS_VAR} -parallel 8 -coverprofile=coverage.txt -covermode=atomic -coverpkg=github.com/fleetdm/fleet/v4/... ./cmd/... ./ee/... ./orbit/pkg/... ./orbit/cmd/orbit ./pkg/... ./server/... ./tools/... analyze-go: go test -tags full,fts5,netgo -race -cover ./...