-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make LH Scores available as output parameters #41
Comments
It's a great idea 👍 How do you see a possible output format? perf: ${{ steps.lighthouse.outputs.results-0-performance }}
bp: ${{ steps.lighthouse.outputs.results-0-best-practices }} Don't you mind providing a PR for this idea, that we could start exploring the best options? |
thx for your fast feedback. your suggestions reads plausible
I could also think of something along the lines (not sure this is valid syntax) perf: ${{ steps.lighthouse.outputs.results[0].performance }}
bp: ${{ steps.lighthouse.outputs.results[0].best-practices }}
sorry, I dont have any experience with github actions |
That would be awesome to have, especially since the artefacts aren't that practical to easily compare the |
@magus also proposed this over here: #2 (comment) I like this since it just allows people to do whatever with the data. I haven't yet seen Thinking out loud, the most Lighthouse-y way would be to expose the JSON data that's sitting in the .lighthouseci directory: But that sorta doesn't work, due to how the LHRs are named by timestamp. @patrickhulce what do you think makes sense here? My first thought is starting with output: {
assertionResults,
lhrs: [...], // have to iterate and inspect requestedUrl to find your target
links,
flags,
} One downside here is that the "median run" pick isn't part of this data. |
I think what you're looking for here is something similar to the "manifest" output requested in GoogleChrome/lighthouse-ci#142 (comment) the output would look something like this then? output: {
reports: [
{
"url": "http://localhost:8080/path/to/page",
"representative": true,
"extension": "html",
"filePath": "./localhost_8000-path_to_page-2020_01_30_15_12_12.report.html",
"summary": {"performance": 0.52, "accessibility": 0.79, "seo": 1, "best-practices": 0.23}
},
]
} |
Its the native GithubAction way to provide a composable output. Its the way to go. https://help.github.com/en/actions/building-actions/metadata-syntax-for-github-actions#outputs |
Would be great to have the main LH Scores available as output parameters in the github action.
That way it would be highly flexible so you could e.g.
The text was updated successfully, but these errors were encountered: