Comments (6)
I think what you're looking for here is something similar to the "manifest" output requested in target=filesystem
feature.
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}
},
]
}
from lighthouse-ci-action.
I like this since it just allows people to do whatever with the data. I haven't yet seen output be used on other actions I'm consuming but it feels composable and good.
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
from lighthouse-ci-action.
@magus also proposed this over here: #2 (comment)
In a subsequent comment he gave an example: https://github.com/magus/lighthouse-ci-output/blob/master/.github/workflows/ci.yml ... and here's the CI logs
I like this since it just allows people to do whatever with the data. I haven't yet seen output
be used on other actions I'm consuming but it feels composable and good.
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.
from lighthouse-ci-action.
It's a great idea 👍
How do you see a possible output format?
It needs to refer to multiple URLs, and we can set outputs dynamically. My idea:
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?
from lighthouse-ci-action.
thx for your fast feedback.
your suggestions reads plausible
perf: ${{ steps.lighthouse.outputs.results-0-performance }} bp: ${{ steps.lighthouse.outputs.results-0-best-practices }}
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 }}
Don't you mind providing a PR for this idea, that we could start exploring the best options?
sorry, I dont have any experience with github actions
from lighthouse-ci-action.
That would be awesome to have, especially since the artefacts aren't that practical to easily compare the master
scores (+ average using, say lh-avg
) and the ones from a PR.
from lighthouse-ci-action.
Related Issues (20)
- A way to set cookies before running the analysis ? HOT 1
- Include custom Puppetter Script support to this action.
- The CHROME_PATH environment variable must be set to a Chrome/Chromium executable HOT 2
- Fail during build .dist folder open
- Update lighthouse to v0.11.0 HOT 4
- From 16.03.2023 , Using treosh/lighthouse-ci-action@v9 giving this error : Cannot create new tab, and no tabs already open HOT 6
- Possibility to combine staticDistDir and urls
- Update lighthouse to v0.12.0
- Cannot download lighthouse html reports when using puppeteer
- New Bfcache audit in Lighthouse 10 fails HOT 1
- Custom `retention-days` for artifacts
- Action incorrectly failing when using `includePassedAssertions` HOT 2
- How to pass password when deploy preview in Netlify is protected?
- Access more detailed metrics HOT 2
- Adding a cookie to the request HOT 2
- how to test original URL?
- Update lighthouse to v0.13.0 HOT 2
- Node.js 16 actions are deprecated HOT 1
- Upgrade to Lighthouse v12
- aaa
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lighthouse-ci-action.