Skip to content

Commit 4e97841

Browse files
authored
Create and upload junit-xml artifacts (#617)
With this PR we start storing junit-xml output from test runs, in order to allow tools to be used to display and query test data. Given appropriate tools, this should have some advantages, e.g. - understanding patterns of flakiness in tests across matrix builds within a run, and across runs - easier understanding of how one particular build has failed
1 parent 927abdc commit 4e97841

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,17 +59,25 @@ jobs:
5959
- run: poetry install --no-root --all-extras
6060
- run: poe lint
6161
- run: poe build-develop
62-
- run: poe test -s -o log_cli_level=DEBUG
62+
- run: mkdir junit-xml
63+
- run: poe test -s -o log_cli_level=DEBUG --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
6364
# Time skipping doesn't yet support ARM
6465
- if: ${{ !endsWith(matrix.os, '-arm') }}
65-
run: poe test -s -o log_cli_level=DEBUG --workflow-environment time-skipping
66+
run: poe test -s -o log_cli_level=DEBUG --workflow-environment time-skipping --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}--time-skipping.xml
6667
# Check cloud if proper target and not on fork
6768
- if: ${{ matrix.cloudTestTarget && (github.event.pull_request.head.repo.full_name == '' || github.event.pull_request.head.repo.full_name == 'temporalio/sdk-python') }}
68-
run: poe test -s -o log_cli_level=DEBUG -k test_cloud_client
69+
run: poe test -s -o log_cli_level=DEBUG -k test_cloud_client --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}--cloud.xml
6970
env:
7071
TEMPORAL_CLIENT_CLOUD_API_KEY: ${{ secrets.TEMPORAL_CLIENT_CLOUD_API_KEY }}
7172
TEMPORAL_CLIENT_CLOUD_API_VERSION: 2024-05-13-00
7273
TEMPORAL_CLIENT_CLOUD_NAMESPACE: sdk-ci.a2dd6
74+
- name: "Upload junit-xml artifacts"
75+
uses: actions/upload-artifact@v4
76+
if: always()
77+
with:
78+
name: junit-xml--${{github.run_id}}--${{github.run_attempt}}--${{ matrix.python }}--${{ matrix.os }}
79+
path: junit-xml
80+
retention-days: 14
7381

7482
# Confirm protos are already generated properly with older protobuf
7583
# library and run test with that older version. We must downgrade protobuf

0 commit comments

Comments
 (0)