Skip to content

Commit a16956b

Browse files
ci: add Lighthouse token to env
1 parent 36dc8cf commit a16956b

File tree

2 files changed

+11
-20
lines changed

2 files changed

+11
-20
lines changed

.github/workflows/lighthouse.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,6 @@ jobs:
1616
npm run build
1717
- name: run Lighthouse CI
1818
run: |
19-
npm run lighthouse
19+
npm run lighthouse
20+
env:
21+
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}

.lighthouserc.cjs

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,14 @@ module.exports = {
1111
target: 'temporary-public-storage',
1212
},
1313
assert: {
14-
preset: "lighthouse:recommended",
15-
assertions: {
16-
"first-contentful-paint": [
17-
"warn",
18-
{
19-
"maxNumericValue": 2500,
20-
"aggregationMethod": "optimistic"
21-
}
22-
],
23-
interactive: [
24-
"warn",
25-
{
26-
"maxNumericValue": 5000,
27-
"aggregationMethod": "optimistic"
28-
}
29-
],
30-
"uses-long-cache-ttl": "off",
31-
"uses-http2": "off"
32-
}
14+
assertMatrix: [
15+
{
16+
matchingUrlPattern: '.*',
17+
assertions: {
18+
'first-contentful-paint': ['warn', { maxNumericValue: 2000 }],
19+
},
20+
},
21+
],
3322
},
3423
},
3524
};

0 commit comments

Comments
 (0)