Skip to content

Commit

Permalink
update config lighthouse:
Browse files Browse the repository at this point in the history
  • Loading branch information
aloxe committed Sep 27, 2024
1 parent 0d689c9 commit 2742ee4
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/lighthouse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm install && npm install -g @lhci/cli@0.14.x
- run: npm run build
- run: lhci autorun
- name: npm install, build
run: |
npm install
npm run build
- name: run Lighthouse CI
run: |
npm install -g @lhci/cli@0.14.x
lhci autorun
23 changes: 23 additions & 0 deletions lighthouserc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,30 @@
module.exports = {
ci: {
collect: {
// collect options here
staticDirFileDiscoveryDepth: 1,
},
assert: {
// assert options here
// preset: 'lighthouse:no-pwa',
// https://stackoverflow.com/questions/65550806/how-can-i-set-lighthouse-ci-to-only-test-accessibility
"assertions": {
'first-contentful-paint': ["warn", {"maxNumericValue": 4000}],
'categories:performance': ['warn', { minScore: 1 }],
'categories:accessibility': ['warn', { minScore: 1 }],
'categories:best-practices': ['warn', { minScore: 1 }],
'categories:seo': ['warn', { minScore: 1 }],
"categories:pwa": ["warn", { minScore: 1 }],
}
},
upload: {
target: 'temporary-public-storage',
},
// server: {
// // server options here
// },
// wizard: {
// // wizard options here
// },
},
};

0 comments on commit 2742ee4

Please sign in to comment.