Skip to content

Commit 098e16e

Browse files
sedghiclaude
andcommitted
ci: adopt CodSpeed wizard improvements from PR #65
Pulled the integration tweaks from the codspeed-hq[bot] wizard PR without taking its synthetic benchmarks (ours are richer — real DICOM fixtures across .50/.51/.57/.70/.80/.81/.90/.91/.201/.5). Changes: - CodSpeedHQ/action@v3 → @v4 - Add OIDC auth: `permissions: id-token: write`, drop the `token: ${{ secrets.CODSPEED_TOKEN }}` arg. The action now authenticates via GitHub's OIDC provider — no secret to manage. - Explicit `mode: simulation` on the CodSpeed step (deterministic CPU simulation, <1% variance, hardware-independent). - Add `workflow_dispatch` trigger so CodSpeed can run a backtest from its dashboard once the repo is connected. - Bump Node 18 → 22 in test + codspeed-bench jobs (matches the wizard's recommendation; our package engines are still >=18 so no impact). - Add CodSpeed badge to README. PR #65 can now be closed — its synthetic JS-only benches are subsumed by ours, and these integration tweaks are now in our branch. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 0076b4f commit 098e16e

2 files changed

Lines changed: 15 additions & 8 deletions

File tree

.github/workflows/pr-checks.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ on:
1313
push:
1414
branches-ignore:
1515
- main
16+
# workflow_dispatch lets CodSpeed trigger a backtest run from the
17+
# dashboard (to seed initial perf data after the repo is connected).
18+
workflow_dispatch:
1619

1720
# Cancel in-flight runs when a new push lands on the same PR / branch.
1821
concurrency:
@@ -22,6 +25,7 @@ concurrency:
2225
permissions:
2326
contents: read
2427
pull-requests: write # CodSpeed action posts a sticky PR comment
28+
id-token: write # OIDC token used by CodSpeedHQ/action for auth
2529

2630
jobs:
2731
detect-changes:
@@ -129,7 +133,7 @@ jobs:
129133
- uses: actions/checkout@v4
130134
- uses: actions/setup-node@v4
131135
with:
132-
node-version: '18'
136+
node-version: '22'
133137
- name: Download all built dists
134138
uses: actions/download-artifact@v4
135139
with:
@@ -168,7 +172,7 @@ jobs:
168172
- uses: actions/checkout@v4
169173
- uses: actions/setup-node@v4
170174
with:
171-
node-version: '18'
175+
node-version: '22'
172176
- name: Download all built dists
173177
uses: actions/download-artifact@v4
174178
with:
@@ -193,11 +197,12 @@ jobs:
193197
- name: Install dependencies
194198
run: yarn install --frozen-lockfile
195199
- name: Run CodSpeed benchmarks
196-
# CodSpeedHQ/action@v3 installs valgrind, wires up the instrumentation
197-
# mode for @codspeed/vitest-plugin, runs the inner command under it,
198-
# and uploads to codspeed.io. It also posts/updates a sticky PR
199-
# comment with the per-bench deltas.
200-
uses: CodSpeedHQ/action@v3
200+
# CodSpeedHQ/action@v4 sets up CPU simulation (deterministic, <1%
201+
# variance, hardware-independent), runs the inner command under
202+
# valgrind, uploads to codspeed.io, and posts/updates a sticky PR
203+
# comment with the per-bench deltas. Authenticates via GitHub OIDC
204+
# (id-token: write above) so no CODSPEED_TOKEN secret is needed.
205+
uses: CodSpeedHQ/action@v4
201206
with:
202-
token: ${{ secrets.CODSPEED_TOKEN }}
207+
mode: simulation
203208
run: yarn run bench

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# codecs
22

3+
[![CodSpeed](https://img.shields.io/endpoint?url=https://codspeed.io/badge.json)](https://codspeed.io/cornerstonejs/codecs?utm_source=badge)
4+
35
## Packages
46

57
This repository is maintained as a monorepo. This means that this repository, instead of containing a single project, contains many projects. If you explore our project structure, you'll see the following:

0 commit comments

Comments
 (0)