unlighthouse-ci
v0.17.4
Published
Delightfully scan your entire website with Google Lighthouse. Navigate your performance, accessibility and SEO.
Maintainers
Readme
unlighthouse-ci
Dedicated CI package for Unlighthouse that provides continuous integration capabilities with budget enforcement and exit codes.
Installation
# Use directly with npx
npx unlighthouse-ci --site https://example.com
# Or install globally
npm install -g unlighthouse-ciUsage
Basic CI Scanning
# Run CI scan with default budget (75)
unlighthouse-ci --site https://example.com
# Custom performance budget
unlighthouse-ci --site https://example.com --budget 85
# Desktop scanning with custom output
unlighthouse-ci --site https://example.com --desktop --output-path ./lighthouse-reportsGitHub Actions Integration
name: Lighthouse CI
on: [push, pull_request]
jobs:
lighthouse:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run Lighthouse CI
run: npx unlighthouse-ci --site ${{ secrets.SITE_URL }} --budget 80Features
- Performance budget enforcement with configurable thresholds
- Exit codes for CI/CD pipeline integration
- Static report generation for hosting
- Comprehensive logging and debugging
- Support for custom Lighthouse configurations
Configuration
Create unlighthouse.config.ts for advanced CI configuration:
import { defineUnlighthouseConfig } from 'unlighthouse/config'
export default defineUnlighthouseConfig({
site: 'https://example.com',
ci: {
budget: 80,
buildStatic: true,
},
lighthouseOptions: {
onlyCategories: ['performance', 'accessibility', 'seo'],
}
})Documentation
License
MIT License © 2021-PRESENT Harlan Wilton
