Git Product home page Git Product logo

run-report-action's Introduction

moon - CI run reports

A GitHub action that reports the results of a moon ci run to a pull request as a comment and workflow summary. The report will render all results, their final status, and time to completion, in a beautiful markdown table.

The report will also include additional information about the environment, workflow matrix, and touched files.

Installation

The action must run after the moon ci command!

# ...
jobs:
  ci:
    name: CI
    runs-on: ubuntu-latest
    steps:
      # ...
      - run: moon ci
      - uses: moonrepo/run-report-action@v1
        if: success() || failure()
        with:
          access-token: ${{ secrets.GITHUB_TOKEN }}

If your workflow job is using a build matrix, you'll need to pass the entire matrix object as a JSON string to the matrix input, otherwise the pull request comments will overwrite each other.

# ...
jobs:
  ci:
    name: CI
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest]
        node-version: [16, 18]
    steps:
      # ...
      - run: moon ci
      - uses: moonrepo/run-report-action@v1
        if: success() || failure()
        with:
          access-token: ${{ secrets.GITHUB_TOKEN }}
          matrix: ${{ toJSON(matrix) }}

Inputs

  • access-token (string) - REQUIRED: A GitHub access token that's used for posting comments on the pull request.
  • matrix (string) - The workflow's build matrix as a JSON string. This is required for differentiating builds/comments.
  • slow-threshold (number) - Number of seconds before an action is to be considered slow. Defaults to 120 (2 minutes).
  • sort-by (label | time) - The field to sort the actions table on. If not defined (the default), will display in the action graph's topological order.
  • sort-dir (asc | desc) - The direction to sort the actions table.
  • workspace-root (string) - Root of the moon workspace (if running in a sub-directory). Defaults to working directory.

Terminology

  • Action - The action/task that was ran in moon's runner via moon ci.
  • Estimated savings/loss - How much time was saved/lost by running tasks with moon.
  • Flaky - Action is flaky, as it failed but passed after retries.
  • Info - Additional information and metadata about the action.
  • Projected time - How long all the tasks would have taken to run when ran outside of moon.
  • Slow - Action is slow and took too long to run, based on the threshold.
  • Status - Final status of the action after it ran.
  • Time - How long the action took to run.
  • Total time - How long all actions / the entire runner took to run.
  • Touched files - Files that were created, modified, etc, between the current branch and the base branch. Also used to determine affected projects and tasks.

Example

An example of the report looks like the following:


Run report (ubuntu-latest, 18)

Action Time Status Info
๐ŸŸฉ SetupNodeToolchain 7.2s passed
โฌ›๏ธ SyncNodeProject(types) 2.4ms skipped
โฌ›๏ธ SyncNodeProject(runtime) 7.1ms skipped
๐ŸŸฉ InstallNodeDeps 18.7s passed
๐ŸŸฉ RunTarget(types:build) 6.5s passed
๐ŸŸฉ RunTarget(runtime:build) 6.8s passed
โฌ›๏ธ SyncNodeProject(website) 5.2ms skipped
๐ŸŸฉ RunTarget(website:typecheck) 10.2s passed
๐ŸŸฉ RunTarget(website:format) 11.9s passed
๐ŸŸฉ RunTarget(website:test) 1.5s passed
๐ŸŸฉ RunTarget(website:build) 1m 8s passed
๐ŸŸฉ RunTarget(website:lint) 18.4s passed

run-report-action's People

Contributors

milesj avatar cmanou 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.