Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 20, 2025

This PR implements Lighthouse testing based on the nodejs.org implementation to provide automated performance, accessibility, SEO, and best practices audits for the GitHub Pages site.

What's Added

Lighthouse Configuration (.lighthouserc.json)

  • Runs 3 audits per URL for reliable metrics
  • Tests performance, accessibility, best practices, and SEO
  • Configured with appropriate score thresholds and CI-friendly Chrome flags
  • Uploads reports to temporary public storage for easy sharing

GitHub Actions Workflow (.github/workflows/lighthouse.yml)

  • Automatically runs after successful deployments to main branch
  • Tests both the homepage and experiment template pages
  • Uploads comprehensive HTML reports as workflow artifacts (30-day retention)
  • Includes manual trigger option for on-demand testing
  • Uses SHA-pinned actions for security

Local Development Support

  • Added @lhci/cli dependency for local lighthouse testing
  • New yarn test-lighthouse script for development workflow
  • Updated documentation with complete testing instructions
  • Added .lighthouseci/ to .gitignore to exclude generated reports

Usage

Automated Testing: Lighthouse audits run automatically after each deployment to main branch. Download the HTML reports from the workflow artifacts.

Local Testing:

# Start the development server
bundle exec jekyll serve

# In another terminal, run lighthouse
yarn test-lighthouse

The generated HTML reports provide detailed insights into:

  • Performance metrics and optimization opportunities
  • Accessibility compliance and improvements needed
  • SEO best practices and recommendations
  • Code quality and modern web standards adherence

Fixes #156.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • accounts.google.com
    • Triggering command: /opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --mute-audio --crashpad-handler-pid=4575 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/lighthouse.eWlZtJI --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,5706456788514042299,14311980995302636841,262144 --disable-features=AutofillServerCommunication,CalculateNativeWinOcclusion,CertificateTransparencyComponentUpdater,DialMediaRouteProvider,InterestFeedContentSuggestions,MediaRouter,OptimizationHints,PaintHolding,PrivacySandboxSettings4,Translate --variations-seed-version (dns block)
    • Triggering command: /opt/google/chrome/chrome --disable-features=Translate,OptimizationHints,MediaRouter,DialMediaRouteProvider,CalculateNativeWinOcclusion,InterestFeedContentSuggestions,CertificateTransparencyComponentUpdater,AutofillServerCommunication,PrivacySandboxSettings4 --disable-extensions --disable-component-extensions-with-REDACTED-pages --disable-REDACTED-networking --disable-component-update --disable-client-side-phishing-detection --disable-sync --metrics-recording-only --disable-default-apps --mute-audio --no-default-browser-check --no-first-run --disable-REDACTEDing-occluded-windows --disable-renderer-REDACTEDing --disable-REDACTED-timer-throttling --disable-ipc-flooding-protection --password-store=basic --use-mock-keychain --force-fieldtrials=*BackgroundTracing/default/ --disable-hang-monitor --disable-prompt-on-repost --disable-domain-reliability --propagate-iph-for-testing --remote-debugging-port=46005 --disable-setuid-sandbox --user-data-dir=/tmp/lighthouse.eWlZtJI --no-sandbox --disable-dev-shm-usage --headless=new --noerrdialogs --ozone-platform=headless --ozone-override-screen-size=800,600 --use-angle=swiftshader-webgl about:blank (dns block)
  • android.clients.google.com
    • Triggering command: /opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --mute-audio --crashpad-handler-pid=4575 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/lighthouse.eWlZtJI --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,5706456788514042299,14311980995302636841,262144 --disable-features=AutofillServerCommunication,CalculateNativeWinOcclusion,CertificateTransparencyComponentUpdater,DialMediaRouteProvider,InterestFeedContentSuggestions,MediaRouter,OptimizationHints,PaintHolding,PrivacySandboxSettings4,Translate --variations-seed-version (dns block)
    • Triggering command: /opt/google/chrome/chrome --disable-features=Translate,OptimizationHints,MediaRouter,DialMediaRouteProvider,CalculateNativeWinOcclusion,InterestFeedContentSuggestions,CertificateTransparencyComponentUpdater,AutofillServerCommunication,PrivacySandboxSettings4 --disable-extensions --disable-component-extensions-with-REDACTED-pages --disable-REDACTED-networking --disable-component-update --disable-client-side-phishing-detection --disable-sync --metrics-recording-only --disable-default-apps --mute-audio --no-default-browser-check --no-first-run --disable-REDACTEDing-occluded-windows --disable-renderer-REDACTEDing --disable-REDACTED-timer-throttling --disable-ipc-flooding-protection --password-store=basic --use-mock-keychain --force-fieldtrials=*BackgroundTracing/default/ --disable-hang-monitor --disable-prompt-on-repost --disable-domain-reliability --propagate-iph-for-testing --remote-debugging-port=46005 --disable-setuid-sandbox --user-data-dir=/tmp/lighthouse.eWlZtJI --no-sandbox --disable-dev-shm-usage --headless=new --noerrdialogs --ozone-platform=headless --ozone-override-screen-size=800,600 --use-angle=swiftshader-webgl about:blank (dns block)
  • clients2.google.com
    • Triggering command: /opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --mute-audio --crashpad-handler-pid=4575 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/lighthouse.eWlZtJI --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,5706456788514042299,14311980995302636841,262144 --disable-features=AutofillServerCommunication,CalculateNativeWinOcclusion,CertificateTransparencyComponentUpdater,DialMediaRouteProvider,InterestFeedContentSuggestions,MediaRouter,OptimizationHints,PaintHolding,PrivacySandboxSettings4,Translate --variations-seed-version (dns block)
    • Triggering command: /opt/google/chrome/chrome --disable-features=Translate,OptimizationHints,MediaRouter,DialMediaRouteProvider,CalculateNativeWinOcclusion,InterestFeedContentSuggestions,CertificateTransparencyComponentUpdater,AutofillServerCommunication,PrivacySandboxSettings4 --disable-extensions --disable-component-extensions-with-REDACTED-pages --disable-REDACTED-networking --disable-component-update --disable-client-side-phishing-detection --disable-sync --metrics-recording-only --disable-default-apps --mute-audio --no-default-browser-check --no-first-run --disable-REDACTEDing-occluded-windows --disable-renderer-REDACTEDing --disable-REDACTED-timer-throttling --disable-ipc-flooding-protection --password-store=basic --use-mock-keychain --force-fieldtrials=*BackgroundTracing/default/ --disable-hang-monitor --disable-prompt-on-repost --disable-domain-reliability --propagate-iph-for-testing --remote-debugging-port=46005 --disable-setuid-sandbox --user-data-dir=/tmp/lighthouse.eWlZtJI --no-sandbox --disable-dev-shm-usage --headless=new --noerrdialogs --ozone-platform=headless --ozone-override-screen-size=800,600 --use-angle=swiftshader-webgl about:blank (dns block)
  • safebrowsingohttpgateway.googleapis.com
    • Triggering command: /opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --mute-audio --crashpad-handler-pid=4575 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/lighthouse.eWlZtJI --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,5706456788514042299,14311980995302636841,262144 --disable-features=AutofillServerCommunication,CalculateNativeWinOcclusion,CertificateTransparencyComponentUpdater,DialMediaRouteProvider,InterestFeedContentSuggestions,MediaRouter,OptimizationHints,PaintHolding,PrivacySandboxSettings4,Translate --variations-seed-version (dns block)
    • Triggering command: /opt/google/chrome/chrome --disable-features=Translate,OptimizationHints,MediaRouter,DialMediaRouteProvider,CalculateNativeWinOcclusion,InterestFeedContentSuggestions,CertificateTransparencyComponentUpdater,AutofillServerCommunication,PrivacySandboxSettings4 --disable-extensions --disable-component-extensions-with-REDACTED-pages --disable-REDACTED-networking --disable-component-update --disable-client-side-phishing-detection --disable-sync --metrics-recording-only --disable-default-apps --mute-audio --no-default-browser-check --no-first-run --disable-REDACTEDing-occluded-windows --disable-renderer-REDACTEDing --disable-REDACTED-timer-throttling --disable-ipc-flooding-protection --password-store=basic --use-mock-keychain --force-fieldtrials=*BackgroundTracing/default/ --disable-hang-monitor --disable-prompt-on-repost --disable-domain-reliability --propagate-iph-for-testing --remote-debugging-port=46005 --disable-setuid-sandbox --user-data-dir=/tmp/lighthouse.eWlZtJI --no-sandbox --disable-dev-shm-usage --headless=new --noerrdialogs --ozone-platform=headless --ozone-override-screen-size=800,600 --use-angle=swiftshader-webgl about:blank (dns block)
  • www.acls.net
    • Triggering command: /usr/local/bin/node scripts/generate-sitemap.mjs (dns block)
  • www.google.com
    • Triggering command: /opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --mute-audio --crashpad-handler-pid=4575 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/lighthouse.eWlZtJI --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,5706456788514042299,14311980995302636841,262144 --disable-features=AutofillServerCommunication,CalculateNativeWinOcclusion,CertificateTransparencyComponentUpdater,DialMediaRouteProvider,InterestFeedContentSuggestions,MediaRouter,OptimizationHints,PaintHolding,PrivacySandboxSettings4,Translate --variations-seed-version (dns block)
    • Triggering command: /opt/google/chrome/chrome --disable-features=Translate,OptimizationHints,MediaRouter,DialMediaRouteProvider,CalculateNativeWinOcclusion,InterestFeedContentSuggestions,CertificateTransparencyComponentUpdater,AutofillServerCommunication,PrivacySandboxSettings4 --disable-extensions --disable-component-extensions-with-REDACTED-pages --disable-REDACTED-networking --disable-component-update --disable-client-side-phishing-detection --disable-sync --metrics-recording-only --disable-default-apps --mute-audio --no-default-browser-check --no-first-run --disable-REDACTEDing-occluded-windows --disable-renderer-REDACTEDing --disable-REDACTED-timer-throttling --disable-ipc-flooding-protection --password-store=basic --use-mock-keychain --force-fieldtrials=*BackgroundTracing/default/ --disable-hang-monitor --disable-prompt-on-repost --disable-domain-reliability --propagate-iph-for-testing --remote-debugging-port=46005 --disable-setuid-sandbox --user-data-dir=/tmp/lighthouse.eWlZtJI --no-sandbox --disable-dev-shm-usage --headless=new --noerrdialogs --ozone-platform=headless --ozone-override-screen-size=800,600 --use-angle=swiftshader-webgl about:blank (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: fulldecent <382183+fulldecent@users.noreply.github.com>
Copilot AI changed the title [WIP] set up lighthouse testing Add Lighthouse testing infrastructure for performance and quality audits Aug 20, 2025
Copilot AI requested a review from fulldecent August 20, 2025 03:34
Copilot finished work on behalf of fulldecent August 20, 2025 03:34
@fulldecent
Copy link
Owner

prefer #158

@fulldecent fulldecent closed this Aug 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

set up lighthouse testing

2 participants