Lighthouse-ci: Is there any way to integrate with LightWallet?

Created on 31 Jul 2020  路  5Comments  路  Source: GoogleChrome/lighthouse-ci

Hey there,

I'm running the asserts contained in my budgets.json file, but I'm getting always an empty file named assertion-results.json (guessed because Everything is OK). Is there a way to integrate with LightWallet to have a single report integrated when running the autorun command.

Thanks

bug docs good first issue

All 5 comments

Thanks for filing @skarensmoll!

Breaking it down...

I'm running the asserts contained in my budgets.json

Are you running with the two options shown in the example in the docs? What does your config look like?

Is there a way to integrate with LightWallet to have a single report integrated when running the autorun command.

I'm not sure what you mean by "a single report". Lighthouse will generate its regular report and if following the example above, the regular budgets section should be in the Lighthouse report. Lighthouse CI does not generate a separate report, assertions will just print in the CLI logs if they fail. If you're using the LHCI server, assertions are not yet supported in the UI there (see #100)

Thanks for your reply I wasn't following the example in the docs. I just configured mylighthouserc.json file it and it looks like this:

{
  "ci": {
    "collect": {
      "staticDistDir": "build/",
      "url": [
        "index.html"
      ],
      "isSinglePageApplication": true,
      "numberOfRuns": 2,
      "settings": {
        "budgetsPath": "budgets.json"
      }
    },
    "upload": {
        "target": "temporary-public-storage"
      },
    "assert": {
        "preset": "lighthouse:recommended",
      "includePassedAssertions": false,
      "assertions": {
        "performance-budget": "error"
      }
    }
  }
}

My buget file is the following:

[{ "path": "/*", "timings": [{ "metric": "interactive", "budget": 5000 }, { "metric": "first-meaningful-paint", "budget": 2000 } ], "resourceSizes": [{ "resourceType": "total", "budget": 500 }, { "resourceType": "script", "budget": 150 }, { "resourceType": "image", "budget": 200 }, { "resourceType": "stylesheet", "budget": 10 }, { "resourceType": "media", "budget": 20 }, { "resourceType": "font", "budget": 50 }, { "resourceType": "other", "budget": 200 } ], "resourceCounts": [{ "resourceType": "third-party", "budget": 3 }] }]

However when I run this command lhci autorun && lhci assert the reports it generates does
not show any section on the reports about the budget.

Thanks in advance!

Aha! lighthouse renamed the option to just budgetPath since those docs were written. They'll need to be updated.

If you use budgetPath instead of budgetsPath does it start working as expected?

OMG it's working!!! Thanks a lot :D

Hurray great to hear! If anyone is interested in a PR, this would be a great first issue for newcomers and high impact fix :)

Was this page helpful?
0 / 5 - 0 ratings