Inspired by @lhci/server
, this server compatible with @lhci/[email protected]
to save historical Lighthouse data, displays trends in a dashboard, and offers comparison between builds.
-
Create project, database and deploy collections based on appwrite.json
-
Deploy appwrite function (lighthouse-server) and set environment variables (refer here)
-
After deployment, obtain the function domain.
-
Install Lighthouse CI CLI tool globally.
npm install -g @lhci/[email protected]
-
Refer guide here on how to set up and configure Lighthouse CI on your project. Be sure to add basic auth username and password if you set those in your deployment environment variables.
-
Create project by running
lhci wizard
(refer here for more details, remember to use the function domain obtained as URL of your LHCI server) -
Run
lhci autorun
to collect and save lighthouse results for your project on the server you just deployed. Unfortunately,lhci autorun
will fail with502 Bad Gateway
when it sends PUT request to seal build at path/v1/projects/:projectId/builds/:buildId/lifecycle
withContent-Type: application/json
in the header and"sealed"
in the body. You can manually make a request without"sealed"
in the body to seal build and generate statistics for the data you just uploaded.
View demo here