-
-
Notifications
You must be signed in to change notification settings - Fork 98
87 lines (80 loc) · 2.73 KB
/
benchmark-react.yml
File metadata and controls
87 lines (80 loc) · 2.73 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: Benchmark React
on:
pull_request:
branches:
- master
paths:
- 'packages/react/src/**'
- 'packages/core/src/**'
- 'packages/endpoint/src/schemas/**'
- 'packages/normalizr/src/**'
- 'examples/benchmark-react/**'
- '.github/workflows/benchmark-react.yml'
push:
branches:
- master
paths:
- 'packages/react/src/**'
- 'packages/core/src/**'
- 'packages/endpoint/src/schemas/**'
- 'packages/normalizr/src/**'
- 'examples/benchmark-react/**'
- '.github/workflows/benchmark-react.yml'
concurrency:
group: ${{ github.event_name == 'push' && 'gh-pages-bench-react-push' || format('benchmark-react-{0}', github.head_ref) }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions:
contents: write
pull-requests: write
jobs:
benchmark-react:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 1
- uses: actions/setup-node@v6
with:
node-version: '24'
cache: 'yarn'
- name: Install packages
run: ./scripts/ci-install.sh examples/benchmark-react
- name: Install Playwright (Chromium + system deps)
run: npx playwright install chromium --with-deps
- name: Build packages
run: yarn build:benchmark-react
- name: Run benchmark
run: |
yarn workspace example-benchmark-react preview &
sleep 10
cd examples/benchmark-react && yarn bench | tee react-bench-output.json
# PR comments on changes
- name: Store benchmark result (PR)
if: ${{ github.event_name == 'pull_request' }}
uses: rhysd/github-action-benchmark@v1
with:
name: 'Benchmark React'
tool: 'customBiggerIsBetter'
output-file-path: examples/benchmark-react/react-bench-output.json
github-token: "${{ secrets.GITHUB_TOKEN }}"
gh-pages-branch: 'gh-pages-bench'
benchmark-data-dir-path: react-bench
alert-threshold: '150%'
comment-always: true
fail-on-alert: false
alert-comment-cc-users: '@ntucker'
save-data-file: false
auto-push: false
# master reports to history
- name: Store benchmark result (main)
if: ${{ github.event_name == 'push' }}
uses: rhysd/github-action-benchmark@v1
with:
name: 'Benchmark React'
tool: 'customBiggerIsBetter'
output-file-path: examples/benchmark-react/react-bench-output.json
github-token: "${{ secrets.GITHUB_TOKEN }}"
gh-pages-branch: 'gh-pages-bench'
benchmark-data-dir-path: react-bench
auto-push: true
fail-on-alert: false