Something went wrong on our end. Please try again.
Created by: umpox
This PR adds Lighthouse CI to track performance metrics on different branches.
It runs on local instances of:
Lighthouse CI currently only runs on the sourcegraph-async pipeline. This is because it is not currently asserting against anything so should not block any builds. This is also a good opportunity to test it for any flakiness without risking breaking builds
Building:
Running:
lighthouse.js
and some additional flags that are only relevant in CILHCI_GITHUB_APP_TOKEN
set in Buildkite.
3.1. Status checks are attached to PRs with the results of each performance run
3.2. If running on main
, we store the results of the build so future runs can generate comparison reports.Locally there is no need to upload reports and update PR status checks. You can still configure Lighthouse through the CLI, or by updating lighthouse.js
. Just run yarn test-lighthouse
and a report will be opened automatically when the tests have finished
It is quite difficult to get our local 'production' server to mimic how it would be on a deployed site. There are some caveats to address:
meta-description
tag is attached dynamically in the actual production server, we don't mimic this locally. It is also because we do not serve our robots.txt
file locally.Aside from this, it is quite accurate compared to production results.
Closes https://github.com/sourcegraph/sourcegraph/issues/24870