Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Perrotte <mike@npmjs.com>2019-11-01 21:42:47 +0300
committerclaudiahdz <cghr1990@gmail.com>2019-11-14 20:11:49 +0300
commitdbbf977acd1e74bcdec859c562ea4a2bc0536442 (patch)
tree3de1549a28ed757540e9f90667f9183ec8fa9b07 /.github
parentb49c5535b7c41729a8d167b035924c3c66b36de0 (diff)
feat: added workflow to trigger and run benchmarks [2]
PR-URL: https://github.com/npm/cli/pull/278 Credit: @mikemimik Close: #278 Reviewed-by: @claudiahdz
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/benchmark.yml49
1 files changed, 49 insertions, 0 deletions
diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml
new file mode 100644
index 000000000..db9d16e70
--- /dev/null
+++ b/.github/workflows/benchmark.yml
@@ -0,0 +1,49 @@
+---
+name: Benchmark Suite
+
+on:
+ push:
+ branches:
+ - "latest"
+ pull_request:
+ branches:
+ - "**"
+
+jobs:
+ build:
+ name: Trigger Benchmarks
+
+ runs-on: ubuntu-latest
+
+ steps:
+ # Checkout the npm/cli repo
+ - uses: actions/checkout@v1.1.0
+
+ # Installs the specific version of nodejs
+ - name: Use nodejs 12.x
+ uses: actions/setup-node@v1
+ with:
+ node-version: "12.x"
+
+ # Trigger Webhook
+ - name: Trigger Webhook
+ env:
+ DISPATCH_REPO: "benchmarks"
+ DISPATCH_OWNER: "npm"
+ run: |
+ curl \
+ -s \
+ -X POST https://api.github.com/repos/${DISPATCH_OWNER}/${DISPATCH_REPO}/dispatches \
+ -H "Accept: application/vnd.github.everest-preview+json" \
+ -H "Authorization: token ${{ secrets.NPM_DEPLOY_USER_PAT }}" \
+ -d \
+ '
+ {
+ "event_type": "${{ github.event_name }}",
+ "client_payload": {
+ "pr_id": "${{ github.event.pull_request.number }}",
+ "repo": "${{ github.event.repository.name }}",
+ "owner": "${{ github.event.repository.owner.login }}",
+ "commit_sha": "${{ github.event.after }}"
+ }
+ }'