Skip to content

Commit a161583

Browse files
jorgemoyaclaude
andauthored
feat(ci): enable unlighthouse performance audits for vercel (#2882)
* feat(ci): enable unlighthouse performance audits for vercel Re-enable the performance category in Unlighthouse with mitigations for hardware throttling: maxConcurrency=1 and samples=5 (median smoothing absorbs cold start outliers across all discovered pages without needing an explicit warm-up step). Rename artifacts with a "vercel" label for future cross-platform comparison. CATALYST-1768 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore: revert samples to 3 * chore: add concurrency to speed tests * fix: target specific PLP and PDP pages to prevent wasted runtime * fix: change PLP category to bath * fix: expand report * chore: test concurrency and all routes * fix: fixed paths, multiple samples, with concurrency * fix: run all pages, concurrency enabled, 1 sample size * fix: add sample size of 3 * feat: add dynamic sampling * fix: split brands and categories * fix: update excluded routes * fix: excluded paths * fix: exclude other sites * fix: disable throttling * chore: update dynamic sampling * fix: remove brands from custom sampling since it should be picked up automatically * chore: limit concurrency * chore: remove concurrency limit, no visible change --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 7889cfa commit a161583

File tree

2 files changed

+37
-13
lines changed

2 files changed

+37
-13
lines changed

.github/workflows/regression-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ jobs:
3838
if: failure() || success()
3939
uses: actions/upload-artifact@v4
4040
with:
41-
name: unlighthouse-${{ matrix.device }}-report
41+
name: unlighthouse-vercel-${{ matrix.device }}-report
4242
path: './.unlighthouse/'
4343
include-hidden-files: 'true'

unlighthouse.config.ts

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,51 @@
1-
2-
import type { UserConfig } from 'unlighthouse';
1+
import type { UserConfig } from "unlighthouse";
32

43
export default {
54
ci: {
65
buildStatic: true,
7-
// Disabling the budget so we can audit and fix the issues first
6+
reporter: "jsonExpanded",
87
budget: {
98
// "best-practices": 100,
109
// "accessibility": 100,
1110
// "seo": 100,
11+
// performance: 80,
12+
},
13+
},
14+
scanner: {
15+
// Run each page multiple times and use the median to absorb cold start
16+
// outliers across all discovered pages.
17+
samples: 3,
18+
dynamicSampling: 5,
19+
exclude: [
20+
"/bundleb2b/",
21+
"/invoices/",
22+
"/bath/*/*",
23+
"/garden/*/*",
24+
"/kitchen/*/*",
25+
"/publications/*/*",
26+
"/early-access/*/*",
27+
"/digital-test-product/",
28+
"/blog/\\?tag=*",
29+
],
30+
customSampling: {
31+
"/smith-journal-13/|/dustpan-brush/|/utility-caddy/|/canvas-laundry-cart/|/laundry-detergent/|/tiered-wire-basket/|/oak-cheese-grater/|/1-l-le-parfait-jar/|/chemex-coffeemaker-3-cup/|/sample-able-brewing-system/|/orbit-terrarium-small/|/orbit-terrarium-large/|/fog-linen-chambray-towel-beige-stripe/|/zz-plant/":
32+
{ name: "PDP" },
33+
"/shop-all/|/bath/|/garden/|/kitchen/|/publications/|/early-access/": {
34+
name: "PLP",
35+
},
1236
},
13-
},
37+
// Disable throttling to avoid issues with cold start and cold cache.
38+
throttle: false,
39+
},
1440
lighthouseOptions: {
15-
// Disabling performance tests because lighthouse utilizes hardware throttling. This affects concurrently running tests which might lead to false positives.
16-
// The best way to truly measure performance is to use real user metrics – Vercel's Speed Insights is a great tool for that.
17-
onlyCategories: ['best-practices', 'accessibility', 'seo'],
41+
onlyCategories: ["best-practices", "accessibility", "seo", "performance"],
1842
skipAudits: [
1943
// Disabling `is-crawlable` as it's more relevant for production sites.
20-
'is-crawlable',
44+
"is-crawlable",
2145
// Disabling third-party cookies because the only third-party cookies we have is provided through Cloudflare for our CDN, which is not relevant for our audits.
22-
'third-party-cookies',
46+
"third-party-cookies",
2347
// Disabling inspector issues as it's only providing third-party cookie issues, which are not relevant for our audits.
24-
'inspector-issues',
25-
]
26-
}
48+
"inspector-issues",
49+
],
50+
},
2751
} satisfies UserConfig;

0 commit comments

Comments
 (0)