Skip to content
Github action to convert go coverage files to lcov format
Dockerfile Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/workflows
.gitignore
Dockerfile
LICENSE add license Oct 4, 2019
README.md
action.yml
entrypoint.sh

README.md

gcov2lcov-action

Build Status

Convert golang coverage files to lcov format. Works nicely with the coverall github action and uses gcov2lcov.

Inputs

infile

Required Name of the go coverage file. Default coverage.out.

outfile

Required Name of the lcov file to write. Default coverage.lcov.

Outputs

No outputs.

Example usage

uses: jandelgado/gcov2lcov-action@v1.0.0
with:
  infile: coverage.out
  outfile: coverage.lcov

Full example

  coverage:
    runs-on: ubuntu-latest
    steps:
    - name: Install Go
      if: success()
      uses: actions/setup-go@v1
      with:
        go-version: 1.13.x
    - name: Checkout code
      uses: actions/checkout@v1
    - name: Calc coverage 
      run: |
        export PATH=$PATH:$(go env GOPATH)/bin   
        go test -v -covermode=count -coverprofile=coverage.out
    - name: Convert coverage to lcov
      uses: jandelgado/gcov2lcov-action@v1.0.0
      with:
          infile: coverage.out
          outfile: coverage.lcov
    - name: Coveralls
      uses: coverallsapp/github-action@v1.0.1
      with:
          github-token: ${{ secrets.github_token }}
          path-to-lcov: coverage.lcov

See also example repository.

Author

Copyright (C) 2019 Jan Delgado

License

MIT

You can’t perform that action at this time.