Skip to content

Commit b41e944

Browse files
committed
chore: add back go-junit-report tool install
1 parent 0d78a0e commit b41e944

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.pipelines/templates/run-unit-tests.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,15 @@ stages:
1313
steps:
1414
- script: |
1515
set -e
16+
make go-junit-report
1617
1718
# run test, echo exit status code to fd 3, pipe output from test to tee, which splits output to stdout and go-junit-report (which converts test output to report.xml),
1819
# stdout from tee is redirected to fd 4. Take output written to fd 3 (which is the exit code of test), redirect to stdout, pipe to read from stdout then exit with that status code.
1920
# Read all output from fd 4 (output from tee) and write to top stdout
2021
{ { { {
2122
sudo -E env "PATH=$PATH" make test-all;
2223
echo $? >&3;
23-
} | tee >(go tool -modfile=tools.go.mod go-junit-report > report.xml) >&4;
24+
} | tee >($(GOPATH)/bin/go-junit-report > report.xml) >&4;
2425
} 3>&1;
2526
} | { read xs; exit $xs; }
2627
} 4>&1

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -968,11 +968,13 @@ setup: tools install-hooks gitconfig ## performs common required repo setup
968968

969969
##@ Tools
970970

971-
tools: renderkit
971+
tools: renderkit go-junit-report
972972

973973
renderkit: ## Install renderkit for rendering Dockerfile templates
974974
@go install -modfile=$(TOOLS_GO_MOD) github.com/orellazri/renderkit
975975

976+
go-junit-report: ## Install go-junit-report for converting test results to JUnit XML format
977+
@go install -modfile=$(TOOLS_GO_MOD) github.com/jstemmer/go-junit-report
976978

977979
##@ Help
978980

0 commit comments

Comments
 (0)