Skip to content

Commit afef03c

Browse files
feanilclaude
andcommitted
build: collect per-test timing data via --junit-xml
Adds --junit-xml to the pytest invocation so each shard emits a junit file with per-test durations. The file is uploaded as a CI artifact so timing data can be downloaded and used to drive optimal shard rebalancing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 0d8b828 commit afef03c

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/unit-tests.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,16 @@ jobs:
119119
- name: run tests
120120
shell: bash
121121
run: |
122-
python -Wd -m pytest -p no:randomly --ds=${{ env.settings_path }} ${{ env.unit_test_paths }} --cov=.
122+
python -Wd -m pytest -p no:randomly --ds=${{ env.settings_path }} ${{ env.unit_test_paths }} --cov=. \
123+
--junit-xml=reports/junit-${{ matrix.shard_name }}.xml
124+
125+
- name: Upload pytest timing report
126+
if: always()
127+
uses: actions/upload-artifact@v7
128+
with:
129+
name: junit-${{ matrix.shard_name }}-${{ matrix.python-version }}-${{ matrix.django-version }}-${{ matrix.mongo-version }}-${{ matrix.os-version }}
130+
path: reports/junit-${{ matrix.shard_name }}.xml
131+
overwrite: true
123132

124133
- name: rename warnings json file
125134
if: success()

0 commit comments

Comments
 (0)