Skip to content

Latest commit

 

History

History

README.md

🚀 Lighthouse Automation - Reusable CI/CD Component

Complete CI/CD automation package for Google Lighthouse performance and accessibility testing that can be deployed to any web project.

License: MIT Version Last Updated


📦 What's Included

This package contains all the components needed for automated Lighthouse testing:

  • .github/workflows/lighthouse-ci.yml - GitHub Actions workflow for automated testing
  • scripts/lighthouse-ci.sh - Comprehensive local testing script
  • package.json - Required dependencies and npm scripts
  • server.js - Express server with health check endpoint
  • tailwind.config.js - Example Tailwind CSS configuration
  • docs/ - Complete installation and configuration guides

🎯 Features

Automated Performance Testing - Lighthouse audits on every push/PR ✅ Multi-Page Support - Test multiple pages in a single run (desktop + mobile) ✅ Accessibility Audits - WCAG 2.1 AA compliance testing ✅ Health Checks - Reliable server readiness detection ✅ Report Generation - HTML and JSON reports with 7-day retention ✅ Local Testing - Run audits locally before pushing to CI ✅ Zero Configuration - Works out of the box with sensible defaults

🚀 Quick Start

See the INSTALLATION.md guide for detailed setup instructions.

Basic Installation

# 1. Copy Lighthouse-Automation folder to your project root
cp -r Lighthouse-Automation/* /path/to/your/project/

# 2. Install dependencies
npm install

# 3. Update page URLs in scripts/lighthouse-ci.sh
# Edit PAGES and PAGE_NAMES arrays

# 4. Commit and push to trigger CI
git add .github/workflows/lighthouse-ci.yml
git commit -m "Add Lighthouse CI automation"
git push

📚 Documentation

Getting Started

Configuration & Usage

Support

🔧 Prerequisites

  • Node.js >= 20.0.0
  • npm >= 8.0.0
  • GitHub repository with Actions enabled
  • A web server (Express, Node.js, or any HTTP server)

📊 What Gets Tested

  • Performance Score (Target: ≥ 85%)
  • Accessibility Score (Target: ≥ 95%)
  • Best Practices Score (Target: ≥ 90%)
  • SEO Score (Target: ≥ 90%)
  • Core Web Vitals (FCP, LCP, CLS, TBT)
  • Desktop + Mobile viewports

🎓 Learn More

This automation package is based on production implementations and follows GitHub Actions best practices. For more educational content on CI/CD, see:


Version: 1.0.0
Last Updated: November 4, 2025
Node.js: >= 20.0.0
License: MIT