Skip to content

Use the GitHub Action for Lighthouse rather than manually running it #546

@choldgraf

Description

@choldgraf

Description

We currently have an action that runs a lighthouse audit on our built documentation to test for accessibility issues. The way that this audit works is by running pa11y on our built site, and uploading the report as an artifact in GitHub Actions. The problem with this is that artifacts are relatively cumbersome to inspect. You have to go to the actions tab, scroll to artifacts, download them as a ZIP file, unzip them, and then inspect them.

I think it'd be much more streamlined if we used the Lighthouse GitHub Action from treosh to run the same process. It is configurable with an .rc file, and automatically uploads reports to Google Cloud Storage (not ours, the action author's) so that you can click a link to go directly to the report from the action logs. This would simplify our configuration, and the process of viewing a report, which will make the reports more actionable for us.

An example: the Jupyter website

The jupyter.org website uses this action with the following configuration:

https://github.com/jupyter/jupyter.github.io/blob/960b5b6b341217728be706bdee37e56c30362fed/.github/workflows/validate.yml#L89-L108

and this RC file:

https://github.com/jupyter/jupyter.github.io/blob/960b5b6b341217728be706bdee37e56c30362fed/.github/workflows/lighthouserc.json#L1-L22

If an audit fails, it generates log outputs like this:

image

And here's a link to one of those reports:

https://storage.googleapis.com/lighthouse-infrastructure.appspot.com/reports/1641786317342-66791.report.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind: maintenanceImproving maintainability and reducing technical debt

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions