Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate Page Speed Reporting into CICD process #1712

Open
supernova-at opened this issue Sep 19, 2019 · 3 comments
Open

Integrate Page Speed Reporting into CICD process #1712

supernova-at opened this issue Sep 19, 2019 · 3 comments
Labels

Comments

@supernova-at
Copy link
Contributor

supernova-at commented Sep 19, 2019

Overview

Google Page Speed Insights is a subset of Lighthouse, an important tool for measuring the performance of the Venia reference PWA storefront.

https://developers.google.com/speed/docs/insights/v5/get-started?utm_source=lh-chrome-ext

The Ask

Implement page speed reporting as part of our CI process to report on the important metrics of Google Page Speed Insights on each PR.

We want to keep performance top of mind when we're evaluating new code.

@supernova-at supernova-at added the performance Things related to perf label Sep 19, 2019
@sirugh
Copy link
Contributor

sirugh commented May 17, 2021

@magento export issue to JIRA project PWA as Story

@github-jira-sync-bot
Copy link

✅ Jira issue https://jira.corp.magento.com/browse/PWA-1762 is successfully created for this GitHub issue.

@rasmuswikman
Copy link

I don't know if this is still relevant, but there is a GitHub action called Lighthouse CI Action that can do this.

https://github.com/marketplace/actions/lighthouse-ci-action

Here's a sample i ran on my Venia instance (located in .github/workflows/lighthouse.yml):

# ${{ secrets.VENIA_FRONTEND_URL }}       https://venia.mydomain.com
# ${{ secrets.LHCI_GITHUB_APP_TOKEN }}    Get a token from https://github.com/apps/lighthouse-ci

name: Lighthouse
on: [push]
jobs:
  lighthouse:
    name: Lighthouse audit
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Audit URLs using Lighthouse
        uses: treosh/lighthouse-ci-action@v8
        env:
          LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
        with:
          urls: |
            ${{ secrets.VENIA_FRONTEND_URL }}
          temporaryPublicStorage: true

By supplying the LHCI_GITHUB_APP_TOKEN and enabling a branch protection rule in GitHub, the results can be made as status checks for pull requests. In the screenshot below, there are the performance results and by clicking "Details" you are taken to a public full report hosted for seven days at Google.

Screenshot 2021-11-20 at 0 16 10

The rule I made looks like the screenshot below.

Screenshot 2021-11-20 at 0 16 41

There are loads of options and thresholds that can be set, but this is the super simple version of Lighthouse CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants