Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
399f33af
Commit
399f33af
authored
Jul 24, 2021
by
Daniel Nephin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use gotestsum in Go example
parent
64ada62a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
doc/ci/unit_test_reports.md
doc/ci/unit_test_reports.md
+4
-5
No files found.
doc/ci/unit_test_reports.md
View file @
399f33af
...
...
@@ -114,16 +114,15 @@ ruby:
### Go example
Use the following job in
`.gitlab-ci.yml`
, and ensure you use
`-set-exit-code`
,
otherwise the pipeline is marked successful, even if the tests fail:
Use the following job in
`.gitlab-ci.yml`
:
```
yaml
## Use https://github.com/
jstemmer/go-junit-report
to generate a JUnit report format XML file with go
## Use https://github.com/
gotestyourself/gotestsum
to generate a JUnit report format XML file with go
golang
:
stage
:
test
script
:
-
go get
-u github.com/jstemmer/go-junit-report
-
go
test -v 2>&1 | go-junit-report -set-exit-code > report.xml
-
go get
gotest.tools/gotestsum
-
go
testsum --junitfile report.xml --format testname
artifacts
:
when
:
always
reports
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment