GoogleChrome / lighthouse-ci

Automate running Lighthouse for every commit, viewing the changes, and preventing regressions
Apache License 2.0
6.33k stars 633 forks source link

How do I specify assertions in CLI flag? #942

Open ggarnier opened 10 months ago

ggarnier commented 10 months ago

I'm automating some lighthouse-ci runs, and I need to customize some configurations using CLI flags, but I'm having a hard time trying to use --assertions flag in CLI. The docs only show a simple example (--assertions.speed-index=off, which works fine), but I don't know how can I set minScore. Is that supported?

ggarnier commented 10 months ago

I just found out that this works:

lhci assert --assertions.speed-index=error --assertions.speed-index.minScore=0.9

But I still don't know how do I set categories:performance minScore in CLI.

bjon commented 1 month ago

This works for me: lhci autorun --assert.assertions.'categories:pwa'=error --assert.assertions.'categories:pwa'.minScore=0.5