ci(bench): publish the scaled benchmark report as an artifact

The node-24-bench job uploads benchmarks/.dsh-report after the benchmark
step, including when a budget assertion fails, so the report the Vitest
globalSetup renders survives the runner. #5838 deferred this step because
the authoring token had no workflow scope.

Refs #5838
This commit is contained in:
turtle1999
2026-10-08 11:32:17 +08:00
parent 4c93974d9b
commit a646dabbe9
2 changed files with 29 additions and 0 deletions
+12
View File
@@ -249,6 +249,18 @@ jobs:
DSH_GATE_VERBOSE: '1'
run: pnpm run check:ci:bench
# The report global setup renders benchmarks/.dsh-report after the run,
# including after a failing budget assertion.
- name: Upload scaled benchmark report
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v7.0.1
with:
name: benchmark-report
path: benchmarks/.dsh-report/
include-hidden-files: true
if-no-files-found: ignore
retention-days: 7
node-24-consumers:
if: github.event_name == 'pull_request'
runs-on: >-
+17
View File
@@ -646,6 +646,23 @@ describe('CI workflow', () => {
})
})
it('publishes the scaled benchmark report even when a budget fails', () => {
const benchmark = workflowJob(loadWorkflow('.github/workflows/ci.yml'), 'node-24-bench')
expect(benchmark.steps).toContainEqual({
name: 'Upload scaled benchmark report',
if: '${{ !cancelled() }}',
uses: 'actions/upload-artifact@v7.0.1',
with: {
name: 'benchmark-report',
path: 'benchmarks/.dsh-report/',
'include-hidden-files': true,
'if-no-files-found': 'ignore',
'retention-days': 7,
},
})
})
it('gives the Wine Host TypeScript compile the repository heap budget', () => {
const wineGates = readFileSync(resolve(root, 'scripts/wine-windows-gates.sh'), 'utf8')