Datahog is a template repo, configured to collect historical performance data on your products via Lighhouse CI & Github Actions.
Click "Use this template" to clone this repo to your Github account. Ensure Github Actions are enabled on your repo, and follow the configuration guidelines below.
The only config you'll need to edit is the config object in datahog.config.js
.
Property | Description | Type |
---|---|---|
urls | Full urls that you want to run Lighthouse against | Array<string> |
runs | Number of Lighthouse runs per page | number |
output | Formats to output data to | Array<'json'> (only JSON at the moment) |
Clone the repo to your local env, install dependancies and run
# First install Lighthouse CI globally on your machine
npm install -g @lhci/[email protected]
# Then install local deps
npm i && npm run lh
To run the parser without running Lighthouse again, run
npm run lh:parse
To clean the .lighthouseci
directory, run
npm run lh:clean