-
Notifications
You must be signed in to change notification settings - Fork 59
/
lighthouserc.js
40 lines (38 loc) · 947 Bytes
/
lighthouserc.js
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
// https://github.com/GoogleChrome/lighthouse-ci/blob/main/docs/configuration.md
const preset = process.env.LHCI_PRESET || 'desktop';
module.exports = {
ci: {
collect: {
method: 'node',
url: [
'http://localhost:9000/',
'http://localhost:9000/styleguide/product/',
],
startServerCommand: 'cd sites/vital-demo-next && npm run build && npm run start',
startServerReadyTimeout: 300000,
settings: {
preset,
onlyCategories: [
'performance'
],
},
numberOfRuns: 5,
},
assert: {
assertions: {
'categories:performance': [
'error',
{
minScore: 0.55,
aggregationMethod: 'optimistic'
}
]
}
},
upload: {
target: 'temporary-public-storage',
githubToken: process.env.GITHUB_TOKEN || '',
githubStatusContextSuffix: `-${preset}`
},
}
};