-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
84 lines (75 loc) 路 2.66 KB
/
Copy pathclient-nav-benchmarks.yml
File metadata and controls
84 lines (75 loc) 路 2.66 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
# Setup taken from https://codspeed.io/docs/benchmarks/nodejs/vitest
name: Benchmarks
on:
push:
branches:
- 'main'
paths:
- 'packages/**'
- 'benchmarks/**'
pull_request:
paths:
- 'packages/**'
- 'benchmarks/**'
workflow_dispatch:
permissions:
contents: read # required for actions/checkout
id-token: write # required for OIDC authentication with CodSpeed
env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
SERVER_PRESET: 'node-server'
NX_NO_CLOUD: true
jobs:
benchmarks:
name: Run ${{ matrix.benchmark }}:${{ matrix.framework }} CodSpeed benchmark
strategy:
fail-fast: false
matrix:
framework:
- react
- solid
- vue
benchmark:
- client-nav
- ssr
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup Tools
uses: TanStack/config/.github/setup@e4b48f16568324f76f467aa4c2aac2f05db632c3 # main
- name: Run ${{ matrix.benchmark }}:${{ matrix.framework }} CodSpeed benchmark
uses: CodSpeedHQ/action@9d332c4d90b43981c3e55ae8e38e68709996240f # v4.17.0
with:
mode: simulation
run: WITH_INSTRUMENTATION=1 pnpm nx run @benchmarks/${{ matrix.benchmark }}:test:perf:${{ matrix.framework }}
# TODO: once we have solid and vue memory benchmarks, we can merge the 2 jobs into one, and
# simply add `memory-server` and `memory-client` to the `benchmark` matrix above. For now, we only run memory benchmarks for react.
# PS: that unification is only possible if we can link "benchmark name" with "mode: simulation|memory"
memory-benchmarks:
name: Run ${{ matrix.benchmark }}:${{ matrix.framework }} CodSpeed benchmark
strategy:
fail-fast: false
matrix:
benchmark:
- memory-server
- memory-client
framework:
- react
# - solid
# - vue
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup Tools
uses: TanStack/config/.github/setup@e4b48f16568324f76f467aa4c2aac2f05db632c3 # main
- name: Run ${{ matrix.benchmark }}:${{ matrix.framework }} CodSpeed benchmark
uses: CodSpeedHQ/action@9d332c4d90b43981c3e55ae8e38e68709996240f # v4.17.0
with:
mode: memory
run: WITH_INSTRUMENTATION=1 pnpm nx run @benchmarks/${{ matrix.benchmark }}:test:perf:${{ matrix.framework }}