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.
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
.
A results object representing results of Lighthouse audits. This comes from the output of Lighthouse Check action.
The minimum accessibility Lighthouse score required.
The minimum best practices Lighthouse score required.
The minimum performance Lighthouse score required.
The minimum progressive web app Lighthouse score required.
The minimum SEO Lighthouse score required.
An absolute directory path to output report. When the results object isn't specified, this value will need to be.
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"