Companion repo for my demo of Lighthouse CI running on Github Actions environment.
- Provides performance audit after every commit and uploads results as a job artifact.
- Tests performance of app by asserting results with expected min/max values of performance categories. In this example it is 3 metrics:
- overall score of performance
- first-contentful-paint
- first-meaningful-paint
{
"ci": {
"assert": {
"assertions": {
"first-contentful-paint": ["warn", { "maxNumericValue": 3000 }],
"first-meaningful-paint": ["warn", { "maxNumericValue": 5000 }],
"categories:performance": ["warn", { "minScore" : 0.9 }]
},
"includePassedAssertions" : false
}
}
}
- Configured workflow file: .github/workflows/main.yml
- Lighthouse config with basic setup: lighthouserc.json
Tested app is a create-react-app with slightly modified content