-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added workflow to trigger and run benchmarks [1]
- Loading branch information
Michael Perrotte
committed
Nov 7, 2019
1 parent
3e7ed30
commit 5bc1fe9
Showing
1 changed file
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 }}" | ||
} | ||
}' |