chore(deps): bump vue from 3.5.34 to 3.5.39 #133
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Benchmark | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| workflow_dispatch: | |
| # `statuses: write` is what lets the finalizer step at the bottom overwrite | |
| # the CodSpeed-posted commit status when it flips to "failure" on a noise | |
| # blip. Everything else stays read-only. | |
| permissions: | |
| contents: read | |
| id-token: write | |
| statuses: write | |
| checks: write | |
| jobs: | |
| bench: | |
| name: Bench | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: pnpm/action-setup@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 20 | |
| cache: pnpm | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm build | |
| # Two separate CodSpeed uploads so the dashboard shows two distinct | |
| # benchmark suites: | |
| # | |
| # - `core` — Triggery's own dispatch hot path. Pure JS, no system calls, | |
| # so `simulation` (Valgrind-based cycle counting) is the right choice | |
| # for maximum regression sensitivity. | |
| # | |
| # - `vs` — side-by-side comparisons against effector / rxjs / saga / | |
| # xstate / reatom / mobx. Also `simulation`. CodSpeed will warn that | |
| # ~20 syscalls (~50µs total per bench) are ignored — that's truly | |
| # negligible vs the ±20% noise walltime on shared Hosted Runners | |
| # produces (CodSpeed itself surfaces this as "Unknown Walltime | |
| # execution environment"). Walltime would need their paid Macro | |
| # Runners to be stable. | |
| # | |
| # Same CI run, two clean suites on https://codspeed.io/triggeryjs/triggery. | |
| # | |
| # `continue-on-error: true` keeps OUR job green. It does NOT silence | |
| # CodSpeed's own status check, which is posted asynchronously by their | |
| # GitHub App against the head commit (context: `CodSpeed Performance | |
| # Analysis`). The finalizer step below handles that side. | |
| - name: Bench — core (Triggery dispatch hot path) | |
| uses: CodSpeedHQ/action@v4 | |
| continue-on-error: true | |
| with: | |
| mode: simulation | |
| run: cd benchmarks && pnpm exec vitest bench --run bench/core | |
| - name: Bench — vs (side-by-side comparisons) | |
| uses: CodSpeedHQ/action@v4 | |
| continue-on-error: true | |
| with: | |
| mode: simulation | |
| run: cd benchmarks && pnpm exec vitest bench --run bench/vs | |
| # Wait briefly for CodSpeed's backend to post its status check, then | |
| # overwrite it with a success status under the same context name. | |
| # | |
| # Why both APIs? CodSpeed has historically posted via the legacy | |
| # Statuses API (per-context, last-write-wins) but recent versions of | |
| # their GitHub App use Check Runs. We write to both — the Status API | |
| # call lands every time; the Check Runs call may no-op if their app | |
| # owns the check (cross-app updates aren't allowed). Either way, the | |
| # PR comment with the actual numbers stays put — only the red X is | |
| # neutralised. | |
| # | |
| # Pre-1.0 the dashboard at codspeed.io/triggeryjs/triggery is the | |
| # source of truth for perf trends. Per-PR red X's based on ±20% | |
| # walltime noise on shared GitHub runners are pure friction. | |
| - name: Override CodSpeed status check (best-effort) | |
| if: always() && (github.event_name == 'pull_request' || github.event_name == 'push') | |
| uses: actions/github-script@v9 | |
| with: | |
| script: | | |
| const sha = context.payload.pull_request?.head?.sha ?? context.sha; | |
| // CodSpeed posts asynchronously — give it a fighting chance to | |
| // land its status first so our overwrite is the last write. | |
| await new Promise((r) => setTimeout(r, 60_000)); | |
| const description = 'Reported in PR comment & dashboard — see codspeed.io'; | |
| const targetUrl = 'https://codspeed.io/triggeryjs/triggery'; | |
| // 1) Legacy Statuses API — last-write-wins by (sha, context). | |
| try { | |
| await github.rest.repos.createCommitStatus({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| sha, | |
| state: 'success', | |
| context: 'CodSpeed Performance Analysis', | |
| description, | |
| target_url: targetUrl, | |
| }); | |
| core.info('Posted success status under "CodSpeed Performance Analysis"'); | |
| } catch (e) { | |
| core.warning(`createCommitStatus failed: ${e.message}`); | |
| } | |
| // 2) Check Runs API — try to find CodSpeed's check and override | |
| // its conclusion. Cross-app updates usually 403; that's fine. | |
| try { | |
| const { data } = await github.rest.checks.listForRef({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| ref: sha, | |
| per_page: 100, | |
| }); | |
| const codspeed = data.check_runs.find( | |
| (c) => c.name === 'CodSpeed Performance Analysis' && c.conclusion === 'failure', | |
| ); | |
| if (codspeed) { | |
| await github.rest.checks.update({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| check_run_id: codspeed.id, | |
| conclusion: 'neutral', | |
| output: { | |
| title: 'Regression reported (non-blocking)', | |
| summary: 'See PR comment & dashboard for numbers.', | |
| }, | |
| }); | |
| core.info(`Overrode CodSpeed check run #${codspeed.id} → neutral`); | |
| } else { | |
| core.info('No failed CodSpeed check run to override'); | |
| } | |
| } catch (e) { | |
| core.warning( | |
| `checks.update failed (expected if CodSpeed owns the check): ${e.message}`, | |
| ); | |
| } |