Skip to content

build(deps): bump thollander/actions-comment-pull-request from 65f9e5c9a1f2cd378bd74b2e057c9736982a8e74 to e4a76dd2b0a3c2027c3fd84147a67c22ee4c90fa #129

build(deps): bump thollander/actions-comment-pull-request from 65f9e5c9a1f2cd378bd74b2e057c9736982a8e74 to e4a76dd2b0a3c2027c3fd84147a67c22ee4c90fa

build(deps): bump thollander/actions-comment-pull-request from 65f9e5c9a1f2cd378bd74b2e057c9736982a8e74 to e4a76dd2b0a3c2027c3fd84147a67c22ee4c90fa #129

Workflow file for this run

name: Benchmark PR
on:
pull_request_target:
types: [labeled]
permissions:
contents: read
jobs:
benchmark:
if: ${{ github.event.label.name == 'benchmark' }}
runs-on: ubuntu-latest
permissions:
contents: read
outputs:
PR-BENCH: ${{ steps.benchmark-pr.outputs.BENCH_RESULT }}
MAIN-BENCH: ${{ steps.benchmark-main.outputs.BENCH_RESULT }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
ref: ${{github.event.pull_request.head.sha}}
repository: ${{github.event.pull_request.head.repo.full_name}}
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
check-latest: true
node-version: 20
- name: Install
run: |
npm install --ignore-scripts
- name: Run benchmark
id: benchmark-pr
run: |
npm run --silent bench > ./bench-result
content=$(cat ./bench-result)
content="${content//'%'/'%25'}"
content="${content//$'\n'/'%0A'}"
content="${content//$'\r'/'%0D'}"
echo "::set-output name=BENCH_RESULT::$content"
# main benchmark
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: 'main'
persist-credentials: false
- name: Install
run: |
npm install --ignore-scripts
- name: Run benchmark
id: benchmark-main
run: |
npm run --silent bench > ./bench-result
content=$(cat ./bench-result)
content="${content//'%'/'%25'}"
content="${content//$'\n'/'%0A'}"
content="${content//$'\r'/'%0D'}"
echo "::set-output name=BENCH_RESULT::$content"
output-benchmark:
if: "always()"
needs: [benchmark]
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Comment PR
uses: thollander/actions-comment-pull-request@e4a76dd2b0a3c2027c3fd84147a67c22ee4c90fa # v3.0.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
message: |
**PR**:
```
${{ needs.benchmark.outputs.PR-BENCH }}
```
**MAIN**:
```
${{ needs.benchmark.outputs.MAIN-BENCH }}
```
- uses: actions-ecosystem/action-remove-labels@2ce5d41b4b6aa8503e285553f75ed56e0a40bae0 # v1.3.0
with:
labels: |
benchmark
github_token: ${{ secrets.GITHUB_TOKEN }}