treosh / lighthouse-ci-action

Audit URLs using Lighthouse and test performance with Lighthouse CI.
MIT License
1.17k stars 82 forks source link

Recipe for separate Lighthouse job #40

Open paulirish opened 4 years ago

paulirish commented 4 years ago

@snugug shared a cool Github Actions pattern he's using to run multiple jobs in parallel but only after the project has been built. Basically it's a combo of the needs job property combined with uploading/downloading artifacts.

it gives two benefits:

  1. you can do jobs in parallel, to get all CI finishing faster.
  2. a separate 'commit status' item for Lighthouse. Sam sez he likes this especially depending on how he did his budgets. maybe some are required and others more optional.

https://github.com/chromeos/static-site-scaffold/blob/master/.github/workflows/nodejs.yml shows it in use. pretend the commented-out job is still there. ;)


users of this action probably would like to use this kinda pattern.

alekseykulikov commented 4 years ago

Hey @paulirish, thank you for sharing! At Treo, we came up with the same pattern. It allows us to have separate statuses for build and LH results, and test different URL groups in parallel. I will add a recipe with an example for this case.