Shopify Lighthouse CI GitHub Action

Optimizing your theme for performance is key to the success of the merchants that you support, and the experience of their customers. It directly influences conversion rates, repeat business, and search engine rankings.

Every change you make to your theme code can have an impact on performance. To make sure that you identify code that is slowing down your theme before it is in production, you can integrate Lighthouse tests into your theme development workflow using the Shopify Lighthouse CI GitHub Action.

The Shopify Lighthouse CI GitHub Action is a Shopify-specific GitHub Action based off of Google's Lighthouse CI. It runs a Lighthouse audit as part of your continuous integration process for every pull request that you create. It tests the performance of your theme's home page, a product page, and a collection page.

To install the Shopify Lighthouse CI GitHub Action for themes, you must do the following:

  1. Add a custom app access token for the store that you want to use for testing to GitHub.
  2. Create a new GitHub Action workflow for the Shopify Lighthouse CI GitHub Action.
  3. Optional: if you want to see the status of your Lighthouse CI run in the GitHub UI, then add Lighthouse CI as a GitHub status check.