-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (53 loc) · 2.08 KB
/
codspeed.yml
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
name: Benchmarks
on:
push:
branches:
- 'master'
- 'next'
paths:
- 'packages/x-charts*/**'
pull_request:
types:
- labeled
- opened
- synchronize
- reopened
branches:
- 'master'
- 'next'
permissions: {}
jobs:
benchmarks:
name: Benchmarks Charts
runs-on: ubuntu-latest
# L1: Run the benchmarks for pushes to the master or next branch and if the changes are in the charts package based on on.push.paths
# L2: Run the benchmarks if we add the label 'component: charts' to the pull request
# L3: Run the benchmarks for pull requests with the label 'component: charts'
# Yaml syntax looks a little weird, but it is correct.
if: >-
${{
(github.event_name == 'push') ||
(github.event_name == 'pull_request' && github.event.action == 'labeled' && github.event.label.name == 'component: charts') ||
(github.event_name == 'pull_request' && github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'component: charts'))
}}
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
run_install: false
- name: Use Node.js 20.x
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version: 20
cache: 'pnpm' # https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-dependencies
- run: pnpm install --frozen-lockfile
# Ensure we are running on the prod version of our libs
- run: pnpm --filter @mui/x-internals build
- run: pnpm --filter @mui/x-license build
- run: pnpm --filter @mui/x-charts build
- run: pnpm --filter @mui/x-charts-pro build
- name: Run benchmarks
uses: CodSpeedHQ/action@b587655f756aab640e742fec141261bc6f0a569d
with:
run: pnpm --filter @mui-x-internal/performance-charts test:performance
token: ${{ secrets.CODSPEED_TOKEN }}