2525 types : [created]
2626
2727concurrency :
28- group : ${{ github.workflow }}-${{ github.event.issue.number || github.ref }}
28+ # Group by PR (comment events) or ref (push/dispatch) so re-triggering `/bench`
29+ # on a PR supersedes the previous run.
30+ #
31+ # Every comment triggers a workflow run. The job-level `if` skips non-`/bench`
32+ # ones, but that runs after concurrency is evaluated, so an unrelated comment
33+ # can cancel an in-progress benchmark. Give those skipped runs a unique group
34+ # so they collide with nothing.
35+ group : ${{ github.workflow }}-${{ github.event.issue.number || github.ref }}${{ (github.event_name == 'issue_comment' && !startsWith(github.event.comment.body, '/bench')) && format('-skip-{0}', github.run_id) || '' }}
2936 # Don't cancel in-progress baseline runs on main so baselines aren't lost.
3037 cancel-in-progress : ${{ github.event_name != 'push' }}
3138
3643 timeout-minutes : 40
3744 permissions :
3845 contents : read # read PR head / checkout metadata
39- pull-requests : read # pulls.get to resolve PR head + fork check
46+ pull-requests : write # pulls.get + post status comments/reactions on the PR
4047 issues : write # post status comments + reactions on the PR
4148 actions : read # list EDR CI workflow runs for the CI-green gate
4249 # For comment events, only proceed for `/bench` comments on a PR. Other
@@ -158,6 +165,14 @@ jobs:
158165
159166 - name : Start Verdaccio
160167 working-directory : hardhat
168+ # The preceding repoint desyncs packages/hardhat/package.json from
169+ # pnpm-lock.yaml (the `-local.<sha>` sentinel only exists in Verdaccio,
170+ # published later), so disable pnpm's pre-run frozen-lockfile deps check
171+ # for this `pnpm <bin>` invocation — it would otherwise abort with
172+ # ERR_PNPM_OUTDATED_LOCKFILE. Scoped to this step so the earlier
173+ # `pnpm build`/`rebuild` steps keep their verification.
174+ env :
175+ PNPM_CONFIG_VERIFY_DEPS_BEFORE_RUN : " false"
161176 run : pnpm verdaccio start --background
162177
163178 - name : Publish local EDR to Verdaccio
@@ -172,6 +187,9 @@ jobs:
172187 working-directory : hardhat
173188 env :
174189 ALCHEMY_URL : ${{ secrets.ALCHEMY_URL }}
190+ # See "Start Verdaccio": bypass pnpm's frozen-lockfile deps check for
191+ # the repoint-desynced workspace.
192+ PNPM_CONFIG_VERIFY_DEPS_BEFORE_RUN : " false"
175193 # --force-publish: reuse our already-running Verdaccio (instead of
176194 # erroring) and run the global sinceReleasePublish once up front.
177195 # --use-local: republish the (repointed) hardhat workspace packages and
0 commit comments