sourcegraph / sourcegraph-public-snapshot

Code AI platform with Code Search & Cody
https://sourcegraph.com
Other
10.12k stars 1.29k forks source link

Enforce Lighthouse audits in CI #26347

Open umpox opened 3 years ago

umpox commented 3 years ago

We currently have Lighthouse CI performance audits, we should aim to enforce these to ensure that any PR that negatively impacts performance cannot be merged without further discussion.

We can enforce assertions on our core metrics after setting our goals in https://github.com/sourcegraph/sourcegraph/issues/24872

We can enforce other audits such as accessibility and SEO too, see Lighthouse docs: https://github.com/GoogleChrome/lighthouse-ci/blob/main/docs/getting-started.md#add-assertions

We need to ensure that Lighthouse runs as fasts as possible in CI to achieve this effectively. This can be problematic as it requires a production build (which can take around 5 minutes) before running the Lighthouse tests (which currently take around 5 minutes for 4 pages). We should look at parallelising the Lighthouse runs in CI, this was originally implemented in https://github.com/sourcegraph/sourcegraph/pull/25455 but caused some flakiness

github-actions[bot] commented 3 years ago

Heads up @umpox @valerybugakov @5h1ru @pdubroy @taylorsperry - the "team/frontend-platform" label was applied to this issue.