Giter Club home page Giter Club logo

delta-action's Introduction

Delta Action

A GitHub Action for reporting benchmark data and comparing it against a baseline.

Screenshot of a benchmark report comment

The basics

This action reads benchmark metrics on GitHub pull requests and commits, and reports them by adding a comment with any metrics found. It also compares then against the latest commit on the main branch, treating it as the baseline.

The action looks for benchmark data in files on the repository root. These should be named in the format .delta.<metric name> โ€” e.g. .delta.install_time will create a metric called install_time.

These files should contain:

  • A number representing the value of the metric
  • The units of the metric (optional)
  • A human-friendly name of the metric (optional)

Example: .delta.install_time

350ms (Installation time)

The units will determine how the values will be formatted in the benchmark reports. Supported units are:

Configuration

The action supports the following optional inputs:

Name Description Default
base_branch Name of the base branch, if not auto detected autodetect
title Title/heading to include in the comments Delta results
token GitHub access token GITHUB_TOKEN
pr_number The PR this run is associated with (for workflow_run) autodetect
style The rendering style to use when commenting on PRs (options: text, graph) graph

Usage

  1. Add a benchmark step to your workflow that creates a .delta.<metric> file with the format described above
- name: Run benchmark
  run: echo 123ms > .delta.install_time
  1. Add the action to the workflow

    - name: Delta
      uses: netlify/delta-action@v3
      with:
        token: ${{ secrets.GITHUB_TOKEN }}

Contributors

Please see CONTRIBUTING.md for instructions on how to set up and work on this repository. Thanks for contributing!

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.