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 25, 2024
1 parent 0d689c9 commit fcfbd2e
Show file tree
Hide file tree
Showing 2 changed files with 30 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
22 changes: 22 additions & 0 deletions lighthouserc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,29 @@
module.exports = {
ci: {
collect: {
// collect options here
staticDirFileDiscoveryDepth: 1,
// url: ['http://localhost:8080'],
},
assert: {
// assert options here
// preset: 'lighthouse:recommended',
// https://stackoverflow.com/questions/65550806/how-can-i-set-lighthouse-ci-to-only-test-accessibility
"assertions": {
"audit-id-1": ["warn", {"maxNumericValue": 4000}],
"categories:performance": ["warn", { "minScore": 1 }],
"categories:accessibility": ["warn", { "minScore": 1 }],
"categories:pwa": "off",
}
},
upload: {
target: 'temporary-public-storage',
},
// server: {
// // server options here
// },
// wizard: {
// // wizard options here
// },
},
};

0 comments on commit fcfbd2e

Please sign in to comment.