Skip to content

Commit

Permalink
docs: Update benchmark PR schedule and body
Browse files Browse the repository at this point in the history
  • Loading branch information
avaly committed Aug 18, 2023
1 parent 77b3a23 commit 061dda0
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 19 deletions.
41 changes: 23 additions & 18 deletions .github/workflows/benchmark.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Benchmark

on:
push:
branches: [docs/update-benchmark-pr]
schedule:
- cron: '30 5 * * *'
- cron: '30 5 15 * *'

jobs:
benchmark:
Expand All @@ -19,24 +21,27 @@ jobs:
- uses: supercharge/[email protected]
with:
mongodb-version: 6.0
- id: date
run: |
echo "date=$(date +%Y-%m-%d)" >> $GITHUB_OUTPUT
- run: node -v
- run: pnpm install --frozen-lockfile
- run: pnpm benchmark
- id: create-pr
uses: peter-evans/create-pull-request@v5
with:
add-paths: docs/data.json
base: main
body: 'Automated benchmark results generated on ${{ steps.date.outputs.date }}'
branch: docs/benchmark-${{ steps.date.outputs.date }}
commit-message: 'docs: Benchmark results ${{ steps.date.outputs.date }}'
delete-branch: true
reviewers: avaly
title: 'docs: Benchmark results ${{ steps.date.outputs.date }}'
- if: ${{ steps.create-pr.outputs.pull-request-number }}
- id: data
run: |
echo "Pull Request Number - ${{ steps.create-pr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.create-pr.outputs.pull-request-url }}"
echo "date=$(date +%Y-%m-%d)" >> $GITHUB_OUTPUT
echo "results=$(node -e \"console.log(require('./docs/data.json').benchmark.results)\")" >> $GITHUB_OUTPUT
- run: |
echo "${{ steps.data.outputs.results }}"
# - id: create-pr
# uses: peter-evans/create-pull-request@v5
# with:
# add-paths: docs/data.json
# base: main
# body: 'Automated benchmark results generated on ${{ steps.data.outputs.date }}'
# branch: docs/benchmark-${{ steps.data.outputs.date }}
# commit-message: 'docs: Benchmark results ${{ steps.data.outputs.date }}'
# delete-branch: true
# reviewers: avaly
# title: 'docs: Benchmark results ${{ steps.data.outputs.date }}'
# - if: ${{ steps.create-pr.outputs.pull-request-number }}
# run: |
# echo "Pull Request Number - ${{ steps.create-pr.outputs.pull-request-number }}"
# echo "Pull Request URL - ${{ steps.create-pr.outputs.pull-request-url }}"
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Due to its bare feature set and validation run in the MongoDB server, Papr is _f
{{&benchmark.results}}
```

The benchmark results are generated on {{benchmark.date}} from a benchmark with:
The benchmark results were generated on {{benchmark.date}} from a benchmark with:

{{benchmark.configuration}}

Expand Down

0 comments on commit 061dda0

Please sign in to comment.