1212 - uses : actions/setup-node@v4
1313 with :
1414 node-version : ' 22.x'
15+ cache : ' yarn'
16+ cache-dependency-path : yarn.lock
17+ -
run :
corepack prepare [email protected] --activate 1518 - name : ' Setup temporary files'
1619 run : |
1720 echo "BASE_JSON=$(mktemp)" >> $GITHUB_ENV
2023 run : |
2124 git checkout -f ${{ github.event.pull_request.base.sha }}
2225 git clean -fdx
23- npm install --loglevel error
24- if npm run perf -w benchmarks -- -o ${{ env.BASE_JSON }}; then
26+ yarn install --frozen-lockfile --silent
27+ if yarn workspace benchmarks run perf -- -o ${{ env.BASE_JSON }}; then
2528 echo "Ran successfully on base branch"
2629 else
2730 echo "{}" > ${{ env.BASE_JSON }} # Empty JSON as default
@@ -31,14 +34,14 @@ jobs:
3134 run : |
3235 git checkout -f ${{ github.event.pull_request.head.sha }}
3336 git clean -fdx
34- npm install --loglevel error
35- npm run perf -w benchmarks -- -o ${{ env.PATCH_JSON }}
37+ yarn install --frozen-lockfile --silent
38+ yarn workspace benchmarks run perf -- -o ${{ env.PATCH_JSON }}
3639 echo "Ran successfully on patch branch"
3740 - name : ' Collect results'
3841 id : collect
3942 run : |
4043 echo "table<<EOF" >> $GITHUB_OUTPUT
41- npm run compare -w benchmarks -- ${{ env.BASE_JSON }} ${{ env.PATCH_JSON }} >> markdown
44+ yarn workspace benchmarks run compare -- ${{ env.BASE_JSON }} ${{ env.PATCH_JSON }} >> markdown
4245 cat markdown >> $GITHUB_OUTPUT
4346 echo "EOF" >> $GITHUB_OUTPUT
4447 - name : ' Post comment'
6366 - uses : actions/setup-node@v4
6467 with :
6568 node-version : ' 22.x'
69+ cache : ' yarn'
70+ cache-dependency-path : yarn.lock
71+ -
run :
corepack prepare [email protected] --activate 6672 - name : ' Setup temporary files'
6773 run : |
6874 echo "BASE_JSON=$(mktemp)" >> $GITHUB_ENV
7177 run : |
7278 git checkout -f ${{ github.event.pull_request.base.sha }}
7379 git clean -fdx
74- npm install --loglevel error
75- if npm run size -w benchmarks -- -o ${{ env.BASE_JSON }}; then
80+ yarn install --frozen-lockfile --silent
81+ if yarn workspace benchmarks run size -- -o ${{ env.BASE_JSON }}; then
7682 echo "Ran successfully on base branch"
7783 else
7884 echo "{}" > ${{ env.BASE_JSON }} # Empty JSON as default
@@ -82,14 +88,14 @@ jobs:
8288 run : |
8389 git checkout -f ${{ github.event.pull_request.head.sha }}
8490 git clean -fdx
85- npm install --loglevel error
86- npm run size -w benchmarks -- -o ${{ env.PATCH_JSON }}
91+ yarn install --frozen-lockfile --silent
92+ yarn workspace benchmarks run size -- -o ${{ env.PATCH_JSON }}
8793 echo "Ran successfully on patch branch"
8894 - name : ' Collect results'
8995 id : collect
9096 run : |
9197 echo "table<<EOF" >> $GITHUB_OUTPUT
92- npm run compare -w benchmarks -- ${{ env.BASE_JSON }} ${{ env.PATCH_JSON }} >> markdown
98+ yarn workspace benchmarks run compare -- ${{ env.BASE_JSON }} ${{ env.PATCH_JSON }} >> markdown
9399 cat markdown >> $GITHUB_OUTPUT
94100 echo "EOF" >> $GITHUB_OUTPUT
95101 - name : ' Post comment'
0 commit comments