mirror of
https://github.com/jcreek/LivingDexTracker.git
synced 2026-09-16 02:22:17 +00:00
ci(lighthouse): stop lhci reading the form factor as a CLI flag
lhci treats every LHCI_* environment variable as a command-line option, so LHCI_PRESET=mobile reached `lhci assert` as an invalid --preset and failed both jobs after the audits had run. Use LIGHTHOUSE_FORM_FACTOR instead. Also upload the reports: upload-artifact v4+ skips dot-directories such as .lighthouseci unless include-hidden-files is set.
This commit is contained in:
+5
-3
@@ -1,8 +1,10 @@
|
||||
// Lighthouse CI: `npm run test:lighthouse` builds the Node adapter output, serves it and audits the
|
||||
// public pages. Any category below 90 fails the run (and so the PR).
|
||||
// Set LHCI_PRESET=desktop to audit with the desktop profile; the default is Lighthouse's mobile
|
||||
// profile (slow 4G + CPU throttling), which is the stricter of the two.
|
||||
const preset = process.env.LHCI_PRESET === 'desktop' ? 'desktop' : undefined;
|
||||
// Set LIGHTHOUSE_FORM_FACTOR=desktop to audit with the desktop profile; the default is Lighthouse's
|
||||
// mobile profile (slow 4G + CPU throttling), which is the stricter of the two. The variable must not
|
||||
// start with LHCI_: lhci treats those as CLI flags, so LHCI_PRESET was passed to `lhci assert` as
|
||||
// an invalid `--preset`.
|
||||
const preset = process.env.LIGHTHOUSE_FORM_FACTOR === 'desktop' ? 'desktop' : undefined;
|
||||
|
||||
module.exports = {
|
||||
ci: {
|
||||
|
||||
Reference in New Issue
Block a user