Giter Site home page Giter Site logo

Comments (6)

patrickhulce avatar patrickhulce commented on July 27, 2024 4

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.

staabm avatar staabm commented on July 27, 2024 2

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.

paulirish avatar paulirish commented on July 27, 2024 1

@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:
image

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.

alekseykulikov avatar alekseykulikov commented on July 27, 2024

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.

staabm avatar staabm commented on July 27, 2024

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.

Berkmann18 avatar Berkmann18 commented on July 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.