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

How to generate both desktop and mobile reports? #79

Closed
abcfy2 opened this issue Mar 19, 2021 · 5 comments
Closed

How to generate both desktop and mobile reports? #79

abcfy2 opened this issue Mar 19, 2021 · 5 comments
Labels
documentation Improvements or additions to documentation

Comments

@abcfy2
Copy link

abcfy2 commented Mar 19, 2021

It seems that the default report is only for mobile. How to generate both desktop and mobile report ? Just like page speed insights https://developers.google.com/speed/pagespeed/insights/?

@alekseykulikov alekseykulikov added the documentation Improvements or additions to documentation label Mar 22, 2021
@bryzgaloff
Copy link

bryzgaloff commented Mar 23, 2021

Hi @abcfy2, you may set emulatedFormFactor setting of collect stage. Means this way:

  • Workflow file (only part related to setting a config file):
jobs:
  lighthouse:
    steps:
      - uses: treosh/lighthouse-ci-action@v7
        with:
          configPath: '.github/configs/lighthouserc.yml'
  • Config file (only part related to that setting):
ci:
  collect:
    settings:
      emulatedFormFactor: desktop

Docs on settings: https://github.com/GoogleChrome/lighthouse/blob/575e29b8b6634bfb280bc820efea6795f3dd9017/types/externs.d.ts#L164-L165

@abcfy2
Copy link
Author

abcfy2 commented Mar 23, 2021

Did you mean I have to create 2 steps with different configPath to create desktop and mobile reports separately?

@bryzgaloff
Copy link

If you need reports for both form-factors, then yes, two separate steps with two separate configs. Lighthouse itself allows only one value to be set in the config.

@abcfy2
Copy link
Author

abcfy2 commented Mar 23, 2021

Oh I know, thank you.

@abcfy2 abcfy2 closed this as completed Mar 23, 2021
@diimpp
Copy link

diimpp commented Feb 7, 2023

While this feature still not supported GoogleChrome/lighthouse-ci#138 properly,
we can just make lhci cli to run twice with both mobile and desktop, for example as suggested at GoogleChrome/lighthouse-ci#138 (comment)

This action seems like a good place to handle this.

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

No branches or pull requests

4 participants