Skip to content

An action to be used with foo-software/lighthouse-check-action to determine the status of a workflow

Notifications You must be signed in to change notification settings

foo-software/lighthouse-check-status-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Lighthouse Check Status Action

This action is used with Lighthouse Check action to determine status of running workflow. Its main purpose is to fail the workflow if Lighthouse scores don't meet minimum requirements as defined by inputs.

Lighthouse Check GitHub action fail if scores don't meet minimum requirement on a PR

Lighthouse Check GitHub action fail if scores don't meet minimum requirement action output

Inputs

Each value of the inputs below can be used alone or together. If a score of any Lighthouse audit ran by Lighthouse Check action is lower than the value - the workflow will fail with an error message detailing which failed and scores.

lighthouseCheckResults is required or alternatively outputDirectory.

lighthouseCheckResults

A results object representing results of Lighthouse audits. This comes from the output of Lighthouse Check action.

minAccessibilityScore

The minimum accessibility Lighthouse score required.

minBestPracticesScore

The minimum best practices Lighthouse score required.

minPerformanceScore

The minimum performance Lighthouse score required.

minProgressiveWebAppScore

The minimum progressive web app Lighthouse score required.

minSeoScore

The minimum SEO Lighthouse score required.

outputDirectory

An absolute directory path to output report. When the results object isn't specified, this value will need to be.

Example usage

In the below example we use Lighthouse Check action to run audits and provide results as an output utilized in the step after with this action.

name: Test Lighthouse Check Status
on: [pull_request]

jobs:
  lighthouse-check:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - run: npm install
    - name: Run Lighthouse
      uses: foo-software/lighthouse-check-action@master
      id: lighthouseCheck
      with:
        urls: 'https://www.foo.software,https://www.foo.software/contact'
    - name: Handle Lighthouse Check results
      uses: ./
      with:
        lighthouseCheckResults: ${{ steps.lighthouseCheck.outputs.lighthouseCheckResults }}
        minAccessibilityScore: "50"
        minBestPracticesScore: "50"
        minPerformanceScore: "95"
        minProgressiveWebAppScore: "50"
        minSeoScore: "50"

About

An action to be used with foo-software/lighthouse-check-action to determine the status of a workflow

Resources

Stars

Watchers

Forks

Packages

No packages published