Skip to content

limgo-action

Actions
Do not let your test coverage drop
v1.0.2
Latest
Star (2)

limgo-action

Don't let your test coverage drop

GitHub release unlicense


This action uses limgo to enforce test coverage thresholds.

Usage

You can use limgo-action 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.19

      # Run your tests with -coverprofile
      - name: Run tests
        run: |
          go test ./... -coverprofile=test.cov
        
      # Option 1:
      # Run the test coverage check using the limgo-action
      - name: Run test coverage check
        uses: GoTestTools/[email protected]
        with:
          version: "v0.0.0-beta"
          args: "-coverfile=test.cov -outfile=covcheck.tmp -config=.limgo.json -v=3"
      
      # Option 2:
      # Only install limgo and use it later
      - name: Run test coverage check
        uses: GoTestTools/[email protected]
        with:
          version: "v0.0.0-beta"
          install-only: true
      
      # Optional: 
      # Upload the coverage check results as artifact
      - name: Upload test coverage results
        uses: actions/upload-artifact@v3
        if: success() || failure()
        with:
          name: test-coverage-results
          path: covcheck.tmp
          if-no-files-found: error

For more information about limgo please see the limgo repository.

limgo-action is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Do not let your test coverage drop
v1.0.2
Latest

limgo-action is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.