Skip to content

Commit caeed55

Browse files
authored
Correct coverage package scope in common.mk (#139)
Signed-off-by: Davanum Srinivas <[email protected]>
1 parent c19860d commit caeed55

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.github/workflows/lint-test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ jobs:
277277
output_dir: .github/outputs
278278

279279
- name: Generate Coverage Report with Fixed PR Number
280+
if: steps.changed-files.outputs.any_changed == 'true'
280281
run: |
281282
set -e # Exit on error
282283

make/go.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ lint-test: ## Lint and test Go module (vet + golangci-lint + gotestsum)
1717
$(TEST_SETUP_COMMANDS) \
1818
$(GO) vet ./... && \
1919
$(GOLANGCI_LINT) run --config $(GOLANGCI_CONFIG_PATH) $(LINT_EXTRA_FLAGS) && \
20-
$(GOTESTSUM) --junitfile report.xml -- -race $(TEST_EXTRA_FLAGS) ./... -coverprofile=coverage.txt -covermode atomic -coverpkg=./... && \
20+
$(GOTESTSUM) --junitfile report.xml -- -race $(TEST_EXTRA_FLAGS) ./... -coverprofile=coverage.txt -covermode atomic -coverpkg=github.com/nvidia/nvsentinel/$(MODULE_NAME)/... && \
2121
$(GO) tool cover -func coverage.txt && \
2222
$(GOCOVER_COBERTURA) < coverage.txt > coverage.xml
2323

@@ -40,7 +40,7 @@ lint: ## Run golangci-lint
4040
test: ## Run tests with coverage
4141
@echo "Running tests on $(MODULE_NAME)..."
4242
$(TEST_SETUP_COMMANDS) \
43-
$(GOTESTSUM) --junitfile report.xml -- -race $(TEST_EXTRA_FLAGS) ./... -coverprofile=coverage.txt -covermode atomic -coverpkg=./...
43+
$(GOTESTSUM) --junitfile report.xml -- -race $(TEST_EXTRA_FLAGS) ./... -coverprofile=coverage.txt -covermode atomic -coverpkg=github.com/nvidia/nvsentinel/$(MODULE_NAME)/...
4444

4545
.PHONY: coverage
4646
coverage: test ## Generate coverage reports

0 commit comments

Comments
 (0)