-
Notifications
You must be signed in to change notification settings - Fork 8
42 lines (34 loc) · 959 Bytes
/
benchmark.yml
File metadata and controls
42 lines (34 loc) · 959 Bytes
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
name: Performance Benchmarks
on:
# Run on pushes to main branches and feature branches with 'perf' in name
push:
branches: [ main, 'feature/*perf*' ]
# Allow manual triggering
workflow_dispatch:
inputs:
reason:
description: 'Reason for running benchmark'
required: false
default: 'Manual benchmark run'
# Run on release
release:
types: [published]
jobs:
benchmark:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js LTS
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- name: Install dependencies
run: npm ci
- name: Run benchmark
run: |
echo "Starting benchmark run..."
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
echo "Reason: ${{ github.event.inputs.reason }}"
fi
xvfb-run -a npm run benchmark