File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 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 }}
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff 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
4448coverage-html : test # # Generate and open HTML coverage report
You can’t perform that action at this time.
0 commit comments