Git Product home page Git Product logo

gtmetrix-action's Introduction

Run GTMetrix test action

This action uses GTMetrix API 2.0 and provides the following features :

Example of job

  launch-gtmetrix-test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: ingeno/gtmetrix-action@v1
        with:
          api_key: ${{ secrets.GTMETRIX_API_KEY }}
          configuration_file: ./config.yml

api_key and configuration_file are both required. In this example, the file config.yml would be at the root of the repository.

Launch a GTMetrix test

You can configure the test launch parameters by using the exact same key as in the API.

Example of configuration file

  poll_interval: 6
  test_configuration:
    report: lighthouse
    simulate_device: nexus_5
    url: https://www.google.com
    video: false

Only test_configuration.url is required. poll_interval defaults to 3.

Evaluate a GTMetrix report

You can configure the requirement parameters by using the exact same key as in the API.

Example of configuration file

  test_configuration:
    report: legacy
    url: https://www.google.com
    video: true
  requirements:
    structure_score: 95
    onload_duration: 4
    gtmetrix_grade: A

Outputs

Outputs contains the every links in the report response and every attributes except these ones : browser, location and source. Some outputs might not be present depending of your test parameters. For example, the gtmetrix_grade is only available when the test parameter report is lighthouse.

Roadmap

gtmetrix-action's People

Contributors

renovate-bot avatar samufort avatar

Watchers

 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.