Skip to content

Commit 208f964

Browse files
committed
setup junit output
Signed-off-by: Tomasz Janiszewski <[email protected]>
1 parent 574aaf4 commit 208f964

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.github/workflows/test.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ jobs:
3232
- name: Run tests with coverage
3333
run: make test
3434

35+
- name: Upload test results to Codecov
36+
if: ${{ !cancelled() }}
37+
uses: codecov/test-results-action@v1
38+
with:
39+
token: ${{ secrets.CODECOV_TOKEN }}
40+
3541
# - name: Upload coverage to Codecov
3642
# uses: codecov/codecov-action@v4
3743
# with:

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ GOCLEAN=$(GOCMD) clean
1414
# Coverage files
1515
COVERAGE_OUT=coverage.out
1616

17+
#jUnit files
18+
JUNIT_OUT=junit.xml
19+
1720
# Lint files
1821
LINT_OUT=report.xml
1922

@@ -28,7 +31,8 @@ build: ## Build the binary
2831

2932
.PHONY: test
3033
test: ## Run unit tests with coverage
31-
$(GOTEST) -v -cover -coverprofile=$(COVERAGE_OUT) ./...
34+
go install github.com/jstemmer/go-junit-report/[email protected]
35+
$(GOTEST) -v -cover -coverprofile=$(COVERAGE_OUT) ./... -json 2>&1 | go-junit-report -parser gojson > tests.xml
3236

3337
.PHONY: coverage-html
3438
coverage-html: test ## Generate and open HTML coverage report

0 commit comments

Comments
 (0)