Skip to content

build: add Lighthouse CI integration (resolves #267) #24

build: add Lighthouse CI integration (resolves #267)

build: add Lighthouse CI integration (resolves #267) #24

name: Lighthouse CI - Desktop
on: [push, pull_request]
jobs:
lhci:
name: Lighthouse CI
if: ${{ github.repository_owner == 'inclusive-design'}}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Wait for the Netlify Preview
uses: jakepartusch/wait-for-netlify-action@v1
id: netlify
with:
site_name: 'wecount'
max_timeout: 300
- name: Audit URLs using Lighthouse
uses: treosh/lighthouse-ci-action@v10
with:
runs: 3
urls: |
${{ steps.netlify.outputs.url }}
${{ steps.netlify.outputs.url }}/404.html
${{ steps.netlify.outputs.url }}/about/
${{ steps.netlify.outputs.url }}/inclusion-challenges/
${{ steps.netlify.outputs.url }}/initiatives/
${{ steps.netlify.outputs.url }}/badges/
${{ steps.netlify.outputs.url }}/learn/
${{ steps.netlify.outputs.url }}/advisory-panel/
${{ steps.netlify.outputs.url }}/news/
${{ steps.netlify.outputs.url }}/views/
${{ steps.netlify.outputs.url }}/views/page/1/
${{ steps.netlify.outputs.url }}/views/the-importance-of-peripheral-vision/
${{ steps.netlify.outputs.url }}/tags/ai/
${{ steps.netlify.outputs.url }}/search/?s=inclusive
uploadArtifacts: true
temporaryPublicStorage: true
configPath: ./.lighthouserc.js
env:
EMULATE_DEVICE: desktop