I'm running lighthouse for performance testing in a pipeline:
Github workflow:
- name: Run Lighthouse on urls and upload data to private lhci server
if: always()
uses: treosh/lighthouse-ci-action@v9
with:
configPath: ./lighthouserc.yml
config file:
ci:
collect:
# Puppeteer is used to login
puppeteerScript: puppeteer-script.js
puppeteerLaunchOptions:
args:
- '--no-sandbox'
- '--headless'
- '--ignore-certificate-errors'
numberOfRuns: 1
settings:
onlyCategories:
- accessibility
- best-practices
- performance
assert:
preset: lighthouse:recommended
assertions:
categories:performance:
- error
- minScore: .5
categories:accessibility:
- error
- minScore: .85
categories:best-practices:
- error
- minScore: .8
THere's a puppeteer script used for login.
I'm not sure how to set up Lighthouse to run the performance tests in desktop mode.
Any help would be greatly appreciated.