Skip to content

Commit

Permalink
add comment in the pr
Browse files Browse the repository at this point in the history
  • Loading branch information
d-roak committed Sep 10, 2024
1 parent c8aed7a commit c48b6cb
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,28 @@ jobs:
with:
path: ./cache
key: benchmark
- name: Run benchmark
- name: Build
run: |
pnpm install
cd packages/node
pnpm build
cd ../..
- name: Benchmark result
run: |
if [ -f ./cache/benchmark-main.json ]; then
pnpm run bench --outputJson benchmark.json --compare ./cache/benchmark-main.json
pnpm run bench --outputJson benchmark.json --compare ./cache/benchmark-main.json > output.txt
else
pnpm run bench --outputJson benchmark.json
pnpm run bench --outputJson benchmark.json > output.txt
fi
- name: Benchmark result
run: |
pnpm run bench --compare ./cache/benchmark-main.json > output.txt
cat output.txt
- uses: actions/github-script@v6
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: fs.readFileSync('output.txt', 'utf-8')
})
- run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: branch
- name: Store benchmark dataq
Expand Down

0 comments on commit c48b6cb

Please sign in to comment.