mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-09-13 04:03:30 +00:00
feat(ci): assign coverage partitions by recorded file duration
Replace Vitest's hash-based --shard with a coordinator-side longest-processing-time assignment. The coordinator collects the instrumented inventory from a vitest list run (dropping the exempt heavy suites that list does not exclude), reads per-file durations from the Vitest results cache, and seeds heavy subprocess-bound suites into different partitions. A weight-aware test fails when assignment ignores recorded weights, verified by injecting a file-count-only rule. Windows coverage measured partition spread of 442s (275-717s) under hash sharding; a simulation with the same file durations and the new assignment balances partitions to within 21s, cutting the critical partition to roughly half.
This commit is contained in:
@@ -459,6 +459,19 @@ jobs:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
persist-credentials: false
|
||||
# Checkout removes the gitignored duration history, so restore it from
|
||||
# the GitHub cache before coverage and save the updated one afterwards.
|
||||
# The coordinator then weights partitions by measured durations on the
|
||||
# second run instead of degrading to a file-count split. GitHub cache
|
||||
# entries are immutable, so the save key is unique per run and the
|
||||
# restore matches the newest entry through the stable prefix.
|
||||
- name: Restore coverage duration history
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: .coverage-times.json
|
||||
key: coverage-times-${{ github.run_id }}
|
||||
restore-keys: |
|
||||
coverage-times-
|
||||
- name: Enable Developer Mode (symlink support)
|
||||
shell: pwsh
|
||||
run: >-
|
||||
@@ -483,6 +496,15 @@ jobs:
|
||||
- name: Run Windows coverage
|
||||
shell: pwsh
|
||||
run: pnpm run check:ci:coverage
|
||||
- name: Save coverage duration history
|
||||
# Coverage flakes must not prevent the cache from building; the
|
||||
# measured durations remain useful even when a partition failed. The
|
||||
# per-run key keeps every save a fresh immutable cache entry.
|
||||
if: always()
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: .coverage-times.json
|
||||
key: coverage-times-${{ github.run_id }}
|
||||
|
||||
windows-native-tests:
|
||||
if: github.event_name == 'pull_request'
|
||||
|
||||
Reference in New Issue
Block a user