File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ {
2+ "ci" : {
3+ "assert" : {
4+ "assertions" : {
5+ "categories:performance" : [" warn" , { "minScore" : 0.85 }],
6+ "categories:accessibility" : [" error" , { "minScore" : 0.95 }],
7+ "categories:seo" : [" error" , { "minScore" : 0.95 }],
8+ "categories:best-practices" : [" warn" , { "minScore" : 0.85 }]
9+ }
10+ }
11+ }
12+ }
Original file line number Diff line number Diff line change 1+ name : Lighthouse CI
2+
3+ on :
4+ push :
5+ branches : [main]
6+ paths :
7+ - ' website/**'
8+ pull_request :
9+ paths :
10+ - ' website/**'
11+ workflow_dispatch :
12+
13+ jobs :
14+ lighthouse :
15+ runs-on : ubuntu-latest
16+ timeout-minutes : 10
17+ steps :
18+ - uses : actions/checkout@v4
19+
20+ - name : Setup Node
21+ uses : actions/setup-node@v4
22+ with :
23+ node-version : ' 22'
24+ cache : ' npm'
25+ cache-dependency-path : website/package-lock.json
26+
27+ - name : Install and build website
28+ run : |
29+ cd website
30+ npm ci
31+ npm run build
32+
33+ - name : Start local server
34+ run : |
35+ cd website
36+ npx serve out -l 3000 &
37+ sleep 3
38+
39+ - name : Run Lighthouse
40+ uses : treosh/lighthouse-ci-action@v12
41+ with :
42+ urls : |
43+ http://localhost:3000/
44+ http://localhost:3000/playground
45+ http://localhost:3000/docs
46+ configPath : ' .github/lighthouse/lighthouserc.json'
47+ uploadArtifacts : true
48+
49+ - name : Check scores
50+ run : |
51+ echo "Lighthouse audit complete. Check artifacts for detailed results."
You can’t perform that action at this time.
0 commit comments