Giter VIP home page Giter VIP logo

lighthouse-viewer-action's Introduction

Lighthouse Viewer Action

GitHub release GitHub last commit GitHub issues GitHub pull requests GitHub stars GitHub license

View Lighthouse results from Lighthouse CI Action in Command Line Interface.

This action is inspired by the issue of Lighthouse CI Action. Make it easier to view the reports from Lighthouse auditing in Command Line Interface. As a separate action, it can also display other reports that follow the same format of Lighthouse CI Action results.

screenshot

Table of Contents

Usage

Run this action after the Lighthouse CI Action, and specify the resultsPath as the input parameters. To display reports even when a assertion fails, set continue-on-error: true for Lighthouse CI Action and pass the lighthouseOutcome to raise errors after showing the reports.

name: Lighthouse Auditing

on: push

jobs:
  lighthouse:
    runs-on: ubuntu-latest
    name: Lighthouse-CI
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Audit with Lighthouse
        id: lighthouse
        continue-on-error: true
        uses: treosh/lighthouse-ci-action@v10
        with:
          urls: |
              https://example.com/
          configPath: './lighthouserc.json'
      - name: Display Report
        uses: jackywithawhitedog/lighthouse-viewer-action@v1
        with:
          resultsPath: ${{ steps.lighthouse.outputs.resultsPath }}
          lighthouseOutcome: ${{ steps.lighthouse.outcome }}

Input Parameters

resultsPath

Results path of Lighthouse CI Action. The action would take files that match the pattern <resultsPath>/lhr-*.json as the result files.

resultsPath: ${{ steps.<lighthouse_ci_step_id>.outputs.resultsPath }}

lighthouseOutcome

The outcome of Lighthouse CI Action. Set continue-on-error for Lighthouse CI Action and pass the outcome here to delay the assertion failure after displaying Lighthouse reports.

lighthouseOutcome: ${{ steps.<lighthouse_ci_step_id>.outcome }}

lighthouse-viewer-action's People

Contributors

jackywithawhitedog avatar

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.