Skip to main content

jaffamonkey

Lighthouse & Github

Lighthouse is an open-source, automated tool to help you improve the quality of web pages.

You can run Lighthouse on any web page, public or requiring authentication. It has audits for performance, accessibility, progressive web apps, SEO, and more. You can run Lighthouse in Chrome DevTools, from the command line, or as a Node module.

The Github Actions yaml file

Here, we are going to use Github Actions to run the Lighthouse tool against a list of urls. Individual HTML and json reports are generated for each url. Add the yaml file, to the .github/workflows directory in your Github project.

name: Lighthouse Report From Urls List
on: push
jobs:
multiple-urls:
runs-on: ubuntu-latest
environment: test
steps:
- uses: actions/checkout@v4
- name: Run Lighthouse on multiple URLs and interpolate env variables.
uses: treosh/lighthouse-ci-action@v11
env:
URL_DOMAIN: 'jaffamonkey.com'
with:
urls: |
https://jaffamonkey.com
https://jaffamonkey.com/contact
https://jaffamonkey.com/skills/accessibility
https://jaffamonkey.com/skills/testing
https://jaffamonkey.com/site-checks

uploadArtifacts: true # save results as an action artifacts
temporaryPublicStorage: true # upload lighthouse report to the temporary storage

Example report output

Lighthouse report

More resources

Here are a couple more resources, or check out the full list.

  1. Superagent API testing

    Superagent is a small progressive client-side HTTP request library, and Node.js module with the same API, supporting many high-level HTTP client features.

  2. Artillery load test

    Artillery is a scalable, flexible and easy-to-use platform that contains everything you need for production-grade load testing.