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 d5b5917
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 17 deletions.
42 changes: 26 additions & 16 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 @@ -16,6 +18,14 @@ jobs:
with:
node-version-file: 'package.json'
cache: 'pnpm'
- uses: actions/[email protected]
id: results
with:
script: |
const data = require('./docs/data.json');
core.setOutput('results', .benchmark.results);
- run: |
echo "${{ steps.results.outputs.results }}"
- uses: supercharge/[email protected]
with:
mongodb-version: 6.0
Expand All @@ -25,18 +35,18 @@ jobs:
- 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 }}
run: |
echo "Pull Request Number - ${{ steps.create-pr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.create-pr.outputs.pull-request-url }}"
# - 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 }}
# 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 d5b5917

Please sign in to comment.