summaryrefslogtreecommitdiff
path: root/preact/.github/workflows/pr-reporter.yml
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2021-08-23 16:46:06 -0300
committerSebastian <sebasjm@gmail.com>2021-08-23 16:48:30 -0300
commit38acabfa6089ab8ac469c12b5f55022fb96935e5 (patch)
tree453dbf70000cc5e338b06201af1eaca8343f8f73 /preact/.github/workflows/pr-reporter.yml
parentf26125e039143b92dc0d84e7775f508ab0cdcaa8 (diff)
downloadnode-vendor-38acabfa6089ab8ac469c12b5f55022fb96935e5.tar.gz
node-vendor-38acabfa6089ab8ac469c12b5f55022fb96935e5.tar.bz2
node-vendor-38acabfa6089ab8ac469c12b5f55022fb96935e5.zip
added web vendorsHEADmaster
Diffstat (limited to 'preact/.github/workflows/pr-reporter.yml')
-rw-r--r--preact/.github/workflows/pr-reporter.yml51
1 files changed, 51 insertions, 0 deletions
diff --git a/preact/.github/workflows/pr-reporter.yml b/preact/.github/workflows/pr-reporter.yml
new file mode 100644
index 0000000..b5e2f1b
--- /dev/null
+++ b/preact/.github/workflows/pr-reporter.yml
@@ -0,0 +1,51 @@
+name: Report Results to PR
+
+on:
+ # The pull_request event can't write comments for PRs from forks so using this
+ # workflow_run workflow as a workaround
+ workflow_run:
+ workflows: ['Benchmarks']
+ branches: ['**']
+ types:
+ - completed
+ - requested
+
+jobs:
+ report_running:
+ name: Report benchmarks are in-progress
+ runs-on: ubuntu-latest
+ # Only add the "benchmarks are running" text when a workflow_run is
+ # requested (a.k.a starting)
+ if: ${{ github.event.action == 'requested' }}
+ steps:
+ - name: Report Tachometer Running
+ uses: andrewiggins/tachometer-reporter-action@v2
+ with:
+ # Set initialize to true so this action just creates the comment or
+ # adds the "benchmarks are running" text
+ initialize: true
+
+ report_results:
+ name: Report benchmark results
+ runs-on: ubuntu-latest
+ # Only run this job if the event action was "completed" and the triggering
+ # workflow_run was successful
+ if: ${{ github.event.action == 'completed' && github.event.workflow_run.conclusion == 'success' }}
+ steps:
+ # Download the artifact from the triggering workflow that contains the
+ # Tachometer results to report
+ - uses: dawidd6/action-download-artifact@v2
+ with:
+ workflow: ${{ github.event.workflow.id }}
+ run_id: ${{ github.event.workflow_run.id }}
+ name: results
+ path: results
+
+ # Create/update the comment with the latest results
+ - name: Report Tachometer Results
+ uses: andrewiggins/tachometer-reporter-action@v2
+ with:
+ path: results/*.json
+ base-bench-name: preact-master
+ pr-bench-name: preact-local
+ summarize: 'duration, usedJSHeapSize'