diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d9176179b3..b0d21e63f9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: >- diff --git a/scripts/ci-workflow.spec.ts b/scripts/ci-workflow.spec.ts index bcc572762f..3831b5fc36 100644 --- a/scripts/ci-workflow.spec.ts +++ b/scripts/ci-workflow.spec.ts @@ -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')