Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Lighthouse CLI on Circle CI scores higher than expected #4003
Using the Chome extension, in incognito mode with other extensions disabled, I am getting scores in the mid-80's.
I added Lighthouse to my continuous integration process tests running on the live website and a new environment created for pull requests. The idea being if the overall performance score is more than 5 points worse on the pull request the Circle CI build will fail, disallowing a merge on GitHub.
To test this is intentionally created a pull request that should receive a lower score by adding a large image to the page and disable Varnish full page cache so the response is served directly from WordPress.
As expected, the Lighthouse report run from my local machine using the Chrome extension returns a performance score of
Unexpectedly, the Lighthouse report run on Circle CI using the CLI version returns a performance score of
I expected something running on a CI server to be slightly faster but the large discrepancy (
Any suggestions are most welcome.
Thanks for reporting @ataylorme great to see you're adding Lighthouse to your CI!
It looks like your code is running Lighthouse on headless where throttling is not available. For this reason, we actually recommend running regular headful Chrome with XVFB in server environments (see the docs).
Let us know if you run into any issues getting XVFB running or you find something in those docs to be unclear!