-
-
Notifications
You must be signed in to change notification settings - Fork 1
69 lines (56 loc) · 1.67 KB
/
performance-benchmarks.yml
File metadata and controls
69 lines (56 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Performance Benchmarks
on:
push:
branches: [master]
paths:
- 'src/node/mcp-server.mjs'
- 'src/node/index.mjs'
- 'src/core/**'
- 'benchmarks/**'
pull_request:
branches: [master]
paths:
- 'src/node/mcp-server.mjs'
- 'src/node/index.mjs'
- 'src/core/**'
- 'benchmarks/**'
workflow_dispatch:
jobs:
benchmark:
name: Run Performance Benchmarks
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Configure git
run: git config --global init.defaultBranch master
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js 22
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Update browserslist database
run: npx update-browserslist-db@latest
- name: Generate OperationConfig
run: npx grunt configTests
- name: Run benchmarks
run: npm run benchmark
- name: Comment benchmark results on PR
if: github.event_name == 'pull_request'
uses: actions/github-script@v7
with:
script: |
const comment = `
## Performance Benchmark Results
Benchmarks have been run for this PR. Check the workflow logs for detailed results.
**Note:** Compare with baseline to detect performance regressions.
`;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment
});