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:
@@ -86,7 +86,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
preset: [mobile, desktop]
|
||||
form-factor: [mobile, desktop]
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-node@v5
|
||||
@@ -97,13 +97,16 @@ jobs:
|
||||
# The homepage streams public stats from the database, so audit against a real stack.
|
||||
- run: npx supabase start
|
||||
- run: npm run test:lighthouse
|
||||
# Not LHCI_*: lhci reads any LHCI_ variable as a CLI flag (LHCI_PRESET became `--preset`).
|
||||
env:
|
||||
LHCI_PRESET: ${{ matrix.preset }}
|
||||
LIGHTHOUSE_FORM_FACTOR: ${{ matrix.form-factor }}
|
||||
- uses: actions/upload-artifact@v6
|
||||
if: always()
|
||||
with:
|
||||
name: lighthouse-${{ matrix.preset }}
|
||||
name: lighthouse-${{ matrix.form-factor }}
|
||||
path: .lighthouseci/
|
||||
# upload-artifact v4+ skips dot-directories unless told otherwise.
|
||||
include-hidden-files: true
|
||||
if-no-files-found: ignore
|
||||
- if: always()
|
||||
run: npx supabase stop
|
||||
|
||||
Reference in New Issue
Block a user