-
-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (40 loc) · 1.35 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
name: codspeed-benchmarks
on:
push:
branches:
- "main"
pull_request:
# `workflow_dispatch` allows CodSpeed to trigger backtest
# performance analysis in order to generate initial data.
workflow_dispatch:
jobs:
benchmarks:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 20.x ]
env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
# Fetch all git history so that yarn workspaces --since can compare with the correct commits
# @link https://github.com/actions/checkout#fetch-all-history-for-all-tags-and-branches
fetch-depth: 0
- name: ⚙️ Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: ⚙️ Nx setup - SHAs for base and head for `nx affected` commands
id: nx-set-shas
uses: nrwl/nx-set-shas@v4
- run: |
echo "BASE: ${{ steps.nx-set-shas.outputs.base }}"
echo "HEAD: ${{ steps.nx-set-shas.outputs.head }}"
- name: 📥 Monorepo install
uses: ./.github/actions/yarn-nm-install
- name: 🌠 Run benchmarks
uses: CodSpeedHQ/action@v3
with:
run: yarn g:bench-codspeed
token: ${{ secrets.CODSPEED_TOKEN }}