Skip to content

Commit f20d4eb

Browse files
committed
fix
Signed-off-by: Tomasz Janiszewski <[email protected]>
1 parent 171fc66 commit f20d4eb

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,9 @@ jobs:
3030
run: go mod download
3131

3232
- name: Run tests with coverage
33-
run: make test
33+
run: make test-coverage-and-junit
3434

3535
- name: Upload test results to Codecov
36-
if: ${{ !cancelled() }}
3736
uses: codecov/test-results-action@v1
3837
with:
3938
token: ${{ secrets.CODECOV_TOKEN }}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
# Claude Code
77
.claude/
88

9-
# Test coverage output
9+
# Test output
1010
/*.out
11+
/*junit.xml
1112

1213
# Build output
1314
/stackrox-mcp

Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,13 @@ build: ## Build the binary
3636
$(GOBUILD) $(LDFLAGS) -o $(BINARY_NAME) ./cmd/stackrox-mcp
3737

3838
.PHONY: test
39-
test: ## Run unit tests with coverage
39+
test: ## Run unit tests
40+
$(GOTEST) -v ./...
41+
42+
.PHONY: test-coverage-and-junit
43+
test-coverage-and-junit: ## Run unit tests with coverage and junit output
4044
go install github.com/jstemmer/go-junit-report/[email protected]
41-
$(GOTEST) -v -cover -coverprofile=$(COVERAGE_OUT) ./... -json 2>&1 | go-junit-report -parser gojson > tests.xml
45+
$(GOTEST) -v -cover -race -coverprofile=$(COVERAGE_OUT) ./... -json 2>&1 | tee go-junit-report -parser gojson > $(JUNIT_OUT)
4246

4347
.PHONY: coverage-html
4448
coverage-html: test ## Generate and open HTML coverage report

0 commit comments

Comments
 (0)