Skip to content

Commit dbbf977

Browse files
Michael Perrotteclaudiahdz
Michael Perrotte
authored andcommittedNov 14, 2019
feat: added workflow to trigger and run benchmarks [2]
PR-URL: #278 Credit: @mikemimik Close: #278 Reviewed-by: @claudiahdz
1 parent b49c553 commit dbbf977

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed
 

‎.github/workflows/benchmark.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
name: Benchmark Suite
3+
4+
on:
5+
push:
6+
branches:
7+
- "latest"
8+
pull_request:
9+
branches:
10+
- "**"
11+
12+
jobs:
13+
build:
14+
name: Trigger Benchmarks
15+
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
# Checkout the npm/cli repo
20+
- uses: actions/checkout@v1.1.0
21+
22+
# Installs the specific version of nodejs
23+
- name: Use nodejs 12.x
24+
uses: actions/setup-node@v1
25+
with:
26+
node-version: "12.x"
27+
28+
# Trigger Webhook
29+
- name: Trigger Webhook
30+
env:
31+
DISPATCH_REPO: "benchmarks"
32+
DISPATCH_OWNER: "npm"
33+
run: |
34+
curl \
35+
-s \
36+
-X POST https://api.github.com/repos/${DISPATCH_OWNER}/${DISPATCH_REPO}/dispatches \
37+
-H "Accept: application/vnd.github.everest-preview+json" \
38+
-H "Authorization: token ${{ secrets.NPM_DEPLOY_USER_PAT }}" \
39+
-d \
40+
'
41+
{
42+
"event_type": "${{ github.event_name }}",
43+
"client_payload": {
44+
"pr_id": "${{ github.event.pull_request.number }}",
45+
"repo": "${{ github.event.repository.name }}",
46+
"owner": "${{ github.event.repository.owner.login }}",
47+
"commit_sha": "${{ github.event.after }}"
48+
}
49+
}'

0 commit comments

Comments
 (0)
Please sign in to comment.