Skip to content

Update dependency prettier to v3.2.5 #216

Update dependency prettier to v3.2.5

Update dependency prettier to v3.2.5 #216

Workflow file for this run

on:
pull_request:
permissions:
pull-requests: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
benchmark:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- ref: ${{ github.base_ref }}
name: base
- ref: ${{ github.head_ref }}
name: head
steps:
- uses: actions/checkout@v3
with:
ref: ${{ matrix.ref }}
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
bundler-cache: true
- uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { issue: { number: issue_number }, repo: { owner, repo } } = context;
const { data: comments } = await github.rest.issues.listComments({ owner, repo, issue_number });
const existingComment = comments.find(comment => comment.user.login === "github-actions[bot]" && comment.body.includes("Benchmark result: ${{ matrix.name }}"))
const { execSync } = require("child_process");
const result = execSync("bin/benchmark");
const body = `
Benchmark result: ${{ matrix.name }} (${{ matrix.ref }})
\`\`\`
${result}
\`\`\`
`;
if (existingComment) {
github.rest.issues.updateComment({ owner, repo, body, comment_id: existingComment.id });
} else {
github.rest.issues.createComment({ owner, repo, body, issue_number });
}