@@ -41,18 +41,18 @@ jobs:
4141 working-directory : ./internal/cmd/build
4242
4343 - name : Unit test
44- run : go run . unit-test -coverage=${{ matrix.uploadCoverage && 'true' || 'false' }}
44+ run : go run . unit-test -coverage=${{ matrix.uploadCoverage && 'true' || 'false' }} -junit-file-stem ${{matrix.os}}-${{matrix.go-version}}
4545 working-directory : ./internal/cmd/build
4646
4747 - name : Integration tests (without cache)
48- run : go run . integration-test -dev-server
48+ run : go run . integration-test -dev-server -junit-file-stem ${{matrix.os}}-${{matrix.go-version}}-nocache
4949 working-directory : ./internal/cmd/build
5050 env :
5151 WORKFLOW_CACHE_SIZE : " 0"
5252 TEMPORAL_COVERAGE_FILE : ${{ matrix.uploadCoverage && 'integ_test_zero_cache_cover.out' || '' }}
5353
5454 - name : Integration tests (with cache)
55- run : go run . integration-test -dev-server
55+ run : go run . integration-test -dev-server -junit-file-stem ${{matrix.os}}-${{matrix.go-version}}-cache
5656 working-directory : ./internal/cmd/build
5757 env :
5858 TEMPORAL_COVERAGE_FILE : ${{ matrix.uploadCoverage && 'integ_test_normal_cache_cover.out' || '' }}
7070 file : coverage.out
7171 format : golang
7272
73+ - name : Upload junit-xml artifacts
74+ uses : actions/upload-artifact@v4
75+ if : always()
76+ with :
77+ name : junit-xml--${{github.run_id}}--${{github.run_attempt}}--${{matrix.os}}-${{matrix.go-version}}
78+ path : .build/junit-xml # This path is also hardcoded in internal/cmd/build/main.go
79+ retention-days : 14
80+
7381 - name : Docker compose - checkout
7482 if : ${{ matrix.testDockerCompose }}
7583 uses : actions/checkout@v4
@@ -120,13 +128,29 @@ jobs:
120128 - uses : actions/setup-go@v5
121129 with :
122130 go-version : ${{ matrix.go-version }}
131+
132+ - name : Install gotestsum
133+ run : go install gotest.tools/gotestsum@latest
134+
135+ - name : Create junit-xml directory
136+ run : mkdir junit-xml-cloud
137+
123138 - name : Single integration test against cloud
124- run : ' go test -v --count 1 -p 1 . -run "TestIntegrationSuite/TestBasic$"'
139+ run : ' gotestsum --junitfile ../junit-xml-cloud/${{matrix.go-version}}-integration.xml -- -v --count 1 -p 1 . -run "TestIntegrationSuite/TestBasic$"'
125140 working-directory : test
141+
126142 - name : Cloud operations tests
127- run : ' go test -v --count 1 -p 1 . -run "TestCloudOperationsSuite/.*" -cloud-operations-tests'
143+ run : ' gotestsum --junitfile ../junit-xml-cloud/${{matrix.go-version}}-cloud-operations.xml -- -v --count 1 -p 1 . -run "TestCloudOperationsSuite/.*" -cloud-operations-tests'
128144 working-directory : test
129145
146+ - name : Upload junit-xml artifacts
147+ uses : actions/upload-artifact@v4
148+ if : always()
149+ with :
150+ name : junit-xml-cloud--${{github.run_id}}--${{github.run_attempt}}--${{matrix.go-version}}
151+ path : junit-xml-cloud
152+ retention-days : 14
153+
130154 features-test :
131155 uses : temporalio/features/.github/workflows/go.yaml@main
132156 with :
0 commit comments