ci: configure setup and use pnpm in benchmark comparison workflow

The benchmark comparison workflow fails because it runs pnpm install
without setting up node and pnpm first. We configure the setup steps
manually so that checkouts from forks are supported.

Additionally, we update the benchmark comparison script (index.mts)
to use pnpm rather than hardcoded yarn commands to install
dependencies when checking out revisions.

(cherry picked from commit a648e8e914)
This commit is contained in:
Joey Perrott
2026-05-22 19:21:33 +00:00
committed by Alex Rickabaugh
parent 2232a62bb2
commit ef38852213
2 changed files with 14 additions and 2 deletions
+12
View File
@@ -36,6 +36,18 @@ jobs:
# that the action was triggered by a team member.
ref: ${{steps.comment-branch.outputs.head_sha}}
# We cannot use `angular/dev-infra/github-actions/npm/checkout-and-setup-node` here
# because it does not support checking out from a fork (as it lacks a `repository` input).
# Thus, we checkout and setup Node/pnpm manually.
- name: Install pnpm
uses: pnpm/action-setup@903f9c1a6ebcba6cf41d87230be49611ac97822e # v6.0.3
- name: Setup Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: '.nvmrc'
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- uses: angular/dev-infra/github-actions/bazel/configure-remote@ba726e7bca0b08b125ccc6f93c233749e1213c17
+2 -2
View File
@@ -171,14 +171,14 @@ async function runCompare(bazelTargetRaw: string | undefined, compareRef: string
Log.log(green('Checking out comparison revision.'));
git.run(['checkout', 'FETCH_HEAD']);
await exec('yarn');
await exec('pnpm', ['install', '--frozen-lockfile']);
await runBenchmarkTarget(bazelTarget);
} finally {
restoreWorkingStage(git, currentRef);
}
// Re-install dependencies for `HEAD`.
await exec('yarn');
await exec('pnpm', ['install', '--frozen-lockfile']);
const comparisonResults = await collectBenchmarkResults(testlogPath);