Add Google Lighthouse Job
Step 1: What is changing in this MR?
Closes #1990 (closed)
To test locally, install the new packages yarn install
and try to run yarn build
and then yarn lighthouse
. You should see the yarn script execute in the console
and files within the .lighthouseci
directory. Feel free to open the reports generated by the scripts, which you can find in the console output.
- Currently, we have the reports temporarily hosted on a URL that looks like
https://storage.googleapis.com/lighthouse-infrastructure.appspot.com/reports/some_hash_here.report.html
. This is done by the CI script and can be turned off if we would like. This URL endpoint is publicly accessible, but I'm not sure how people find these endpoints easily. Even if they did, nothing about our site is exposed here. I also don't have clarity as to how long these URLs are preserved. However, the output will stay persistent on the pipeline output. I think there is room for experimentation here.- Update: Yeah this is an iceberg. We can have a separate Heroku app ingest all of this temporary storage so we can look at our results over time
🤕 https://github.com/GoogleChrome/lighthouse-ci/blob/main/docs/server.md
- Update: Yeah this is an iceberg. We can have a separate Heroku app ingest all of this temporary storage so we can look at our results over time
- Lighthouse will run 5 times on all listed pages and the resulting report will show the median values of all of the runs. Median is done by default, which we like to prevent outliers from affecting this value.
- This is set to run on both the home page and the pricing page. Those are both P1 pages that can give a bird's eye view of the entire site. I'd be happy to increase the scope but thought this was a good starting point.
Note: If you have a local dev environment on port 3000, you may need to turn it off to get the script to run.
I copied what other CI was there for other scheduled jobs and added an environment variable.
The scheduled job setup is below:
This is intended to run every other sunday at 10am UTC to coincide with sprint releases. I currently have it set off, but can be turned on whenever this MR is merged and we want to see if it works!