Skip to content

Commit b117998

Browse files
committed
ci(ui): pass the per-file timings reporter in Test UI and port its weekly dataset refresh
The test-ui job's whole-suite leg now passes ui/scripts/test-file-timings.mjs beside the default and github-actions reporters, and uploads each shard's report as test-file-timings-N on the full battery's events (continue-on-error, a missing report is a warning). The new ui-test-timings-refresh.yml selects the newest eligible runs, downloads their reports, merges them into ui/scripts/test-shard-timings.json and opens the PR as the fleet App, dry-run on pull_request, mirroring shard-timings-refresh.yml. The selector's shard job name follows the root job (Test UI (N/M)), the generator's generated_by names the workflow that now exists, and the pins the objectui ci.yml carried come back against the root ci.yml and the refresh. Report-only: no threshold, no new failing check. Claude-Session: https://claude.ai/code/session_01JQwxbXf3xRiPQrLhrgsFzw Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 399df5b commit b117998

4 files changed

Lines changed: 494 additions & 38 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3885,23 +3885,50 @@ jobs:
38853885
# paths relative to ui/, the vitest root, passed as positionals with no
38863886
# `--`, the only spelling ui/scripts/vitest-invocation-guard.mjs admits.
38873887
#
3888-
# objectui's full-battery runs also pass its per-file timings reporter
3889-
# and upload the result for the weekly dataset refresh. Both belong to
3890-
# that refresh workflow, which is in the governance-workflow audit
3891-
# (sub-issue 4 of the epic); until it is ported the committed dataset
3892-
# is what the sequencer reads.
3888+
# THE PER-FILE TIMINGS (objectstack#29517). The whole suite also passes
3889+
# ui/scripts/test-file-timings.mjs, the per-file timings reporter, beside
3890+
# the two reporters it would otherwise displace. It writes this shard's
3891+
# report to $OBJECTUI_TEST_TIMINGS_OUT, and the step after this one
3892+
# uploads it on the full battery's events as `test-file-timings-N`.
3893+
# .github/workflows/ui-test-timings-refresh.yml merges those reports
3894+
# weekly into ui/scripts/test-shard-timings.json, the dataset the shard
3895+
# sequencer splits on. Report-only, by ruling: the reporter never throws
3896+
# into vitest (a failure is one stderr line and no report), and nothing
3897+
# here or there grades a duration. The affected speed passes no reporter:
3898+
# a slice of the suite is not a measurement of it.
3899+
# ui/scripts/__tests__/test-file-timings.test.ts holds this step, the
3900+
# upload and the refresh's `--shards` to the names that script spells.
38933901
- name: Run the ui tests (shard ${{ matrix.shard }}/16)
38943902
env:
38953903
MODE: ${{ steps.select.outputs.mode }}
3904+
OBJECTUI_TEST_TIMINGS_OUT: ${{ runner.temp }}/test-file-timings/shard-${{ matrix.shard }}.json
38963905
run: |
38973906
if [ "$MODE" = 'affected' ]; then
38983907
mapfile -t filters < "$RUNNER_TEMP/affected-tests.txt"
38993908
echo "Affected speed: ${#filters[@]} vitest filter(s), shard ${{ matrix.shard }} of 16."
39003909
pnpm --dir ui exec vitest run --shard=${{ matrix.shard }}/16 --reporter=default --reporter=github-actions "${filters[@]}"
39013910
else
3902-
pnpm --dir ui run test --shard=${{ matrix.shard }}/16 --reporter=default --reporter=github-actions
3911+
pnpm --dir ui run test --shard=${{ matrix.shard }}/16 --reporter=default --reporter=github-actions --reporter=./scripts/test-file-timings.mjs
39033912
fi
39043913
3914+
# Diagnostics only, so it can never red a shard: `continue-on-error`, and
3915+
# a missing report is a warning, not an error (the refresh's selector
3916+
# then skips this run by name). Uploaded on the full battery's events
3917+
# only, the deny-list of THE TWO SPEEDS above `jobs:`; a pull request that
3918+
# failed open to the whole suite writes a report and uploads nothing. The
3919+
# refresh reads the newest fifty completed runs of this workflow on
3920+
# `main`, so a push run's report needs two days and a scheduled run's a
3921+
# week, which also covers a quiet weekend of scheduled runs alone.
3922+
- name: Publish this shard's per-file test timings
3923+
if: ${{ always() && github.event_name != 'pull_request' && github.event_name != 'merge_group' }}
3924+
continue-on-error: true
3925+
uses: actions/upload-artifact@v7
3926+
with:
3927+
name: test-file-timings-${{ matrix.shard }}
3928+
path: ${{ runner.temp }}/test-file-timings/
3929+
if-no-files-found: warn
3930+
retention-days: ${{ github.event_name == 'schedule' && 7 || 2 }}
3931+
39053932
test-ui-gate:
39063933
# Stable required-check name for the sharded Test UI matrix (#26460, ruling
39073934
# A, comment 6435318516), in test-gate's shape and for test-gate's reason

0 commit comments

Comments
 (0)