Giter Site home page Giter Site logo

fairmoney / gotestfmt-action Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gotesttools/gotestfmt-action

0.0 0.0 0.0 689 KB

GitHub Action for gotestfmt

Home Page: https://github.com/GoTestTools/gotestfmt

License: MIT License

JavaScript 100.00%

gotestfmt-action's Introduction

gotestfmt: go test output for humans

โš ๏ธ Action required: gotestfmt has moved to the GoTestTools organization and you need to update your references. Please see the announcement. The old repository will be deleted on January 1, 2023.

This action uses gotestfmt to create a beautifully formatted test output in GitHub Actions.

An animation showcasing that gotestfmt transforms a text log into an interactive log with folding sections.

Usage

You can use gotestfmt with the following configuration:

jobs:
  build:
    name: Test
    runs-on: ubuntu-latest
    steps:
      # Checkout your project with git
      - name: Checkout
        uses: actions/checkout@v2

      # Install Go on the VM running the action.
      - name: Set up Go
        uses: actions/setup-go@v2
        with:
          go-version: 1.16

      # Install gotestfmt on the VM running the action.
      - name: Set up gotestfmt
        uses: GoTestTools/gotestfmt-action@v2
        with:
          # Optional: pass GITHUB_TOKEN to avoid rate limiting.
          token: ${{ secrets.GITHUB_TOKEN }}
          # Optional: pass the gotestfmt version you want to run. 
          version: v2.0.0
          # Optional: pass an organization name and repo to use a fork
          org: GoTestTools
          repo: gotestfmt

      # Run tests with nice formatting. Save the original log in /tmp/gotest.log
      - name: Run tests
        run: |
          set -euo pipefail
          go test -json -v ./... 2>&1 | tee /tmp/gotest.log | gotestfmt

      # Upload the original go test log as an artifact for later review.
      - name: Upload test log
        uses: actions/upload-artifact@v2
        if: always()
        with:
          name: test-log
          path: /tmp/gotest.log
          if-no-files-found: error

For more information about gotestfmt please see the gotestfmt repository.

gotestfmt-action's People

Contributors

janosdebugs avatar engelmi avatar norwd avatar erikburt 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.