Repository navigation
51 lines (48 loc) · 1.57 KB
/
Copy pathcodspeed.yml
File metadata and controls
51 lines (48 loc) · 1.57 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
name: CodSpeed build benchmarks
on:
push:
branches: [main]
pull_request:
paths:
- "sites/main-site/**"
# Content-only PRs (blog posts, events, ...) barely move build time; pushes to main still benchmark them
- "!sites/main-site/src/content/**"
- "sites/pipelines/**"
- "astro.config.base.mjs"
- "bin/satteri/**"
- "public/pipelines.json"
- "package.json"
- "package-lock.json"
- "bench/**"
workflow_dispatch:
# Cancel superseded PR runs, but let every push to main finish so it records a baseline
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions:
contents: read
id-token: write # OIDC auth for CodSpeed
jobs:
benchmarks:
# walltime needs CodSpeed's bare-metal runners, GitHub-hosted ones are too noisy
runs-on: codspeed-macro
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
site: [main-site, pipelines]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
node-version: 26
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Run benchmarks
uses: CodSpeedHQ/action@61efe07e57e55bedeab750c434504de272a56e8c # v5.6.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
mode: walltime
run: npm run bench -- ${{ matrix.site }}