GithubHelp home page GithubHelp logo

jandelgado / gcov2lcov-action Goto Github PK

View Code? Open in Web Editor NEW
22.0 3.0 2.0 18 KB

Github action to convert go coverage files to lcov format

License: MIT License

golang lcov coverage gcov2lcov-action coverage-files testing gcov2lcov

gcov2lcov-action's Issues

I don't think -coverpkg=./... is handled well.

codecov: 82%
coveralls: 48%
https://github.com/arvenil/kata

go test -coverpkg=./... -coverprofile=coverage.txt -covermode=atomic ./...

Note -coverpkg=./....
This results in below file (I cut it only to show line 14 of templates.go file):

$ cat coverage.txt | grep templates.go:14
github.com/arvenil/kata/format/templates/templates.go:14.37,19.17 5 0
github.com/arvenil/kata/format/templates/templates.go:14.37,19.17 5 0
github.com/arvenil/kata/format/templates/templates.go:14.37,19.17 5 1
github.com/arvenil/kata/format/templates/templates.go:14.37,19.17 5 0
github.com/arvenil/kata/format/templates/templates.go:14.37,19.17 5 0
github.com/arvenil/kata/format/templates/templates.go:14.37,19.17 5 0

As you may see, for example, line 14 is visible there several times with different count.
This tool converts it to:

DA:14,0
DA:14,0
DA:14,1
DA:14,0
DA:14,0
DA:14,0

And then coveralls doesn't seem to handle it and shows ZERO coverage when there was exactly one pass. Maybe this tool should sum such entries, and as so coveralls would show correct value, or maybe it's a bug worth reporting to coveralls?

error: cannot find GOROOT directory: /opt/hostedtoolcache/go/1.13.15/x64

One of the latest runs of my workflow failed:

Run jandelgado/gcov2lcov-action@master
  with:
    infile: profile.cov
    outfile: coverage.lcov
    version: latest
Run set -x && curl -sLf "$([ latest == latest ] && echo $LATEST_RELEASE || echo $RELEASE)/${NAME}.tar.gz" | tar zxf - --strip 1
  set -x && curl -sLf "$([ latest == latest ] && echo $LATEST_RELEASE || echo $RELEASE)/${NAME}.tar.gz" | tar zxf - --strip 1
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    NAME: gcov2lcov-linux-amd64
    RELEASE: https://github.com/jandelgado/gcov2lcov/releases/download/latest
    LATEST_RELEASE: https://github.com/jandelgado/gcov2lcov/releases/latest/download
+ tar zxf - --strip 1
++ '[' latest == latest ']'
++ echo https://github.com/jandelgado/gcov2lcov/releases/latest/download
+ curl -sLf https://github.com/jandelgado/gcov2lcov/releases/latest/download/gcov2lcov-linux-amd64.tar.gz
Run set -x && /tmp/gcov2lcov-linux-amd64 -infile "profile.cov" -outfile "coverage.lcov"
  set -x && /tmp/gcov2lcov-linux-amd64 -infile "profile.cov" -outfile "coverage.lcov"
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
+ /tmp/gcov2lcov-linux-amd64 -infile profile.cov -outfile coverage.lcov
2022/05/18 14:07:34 warn: go/build: importGo github.com/pashagolub/pgxmock/: exit status 2
go: cannot find GOROOT directory: /opt/hostedtoolcache/go/1.13.15/x64

2022/05/18 14:07:34 warn: go/build: importGo github.com/pashagolub/pgxmock/: exit status 2
go: cannot find GOROOT directory: /opt/hostedtoolcache/go/1.13.15/x64

2022/05/18 14:07:34 warn: go/build: importGo github.com/pashagolub/pgxmock/: exit status 2
go: cannot find GOROOT directory: /opt/hostedtoolcache/go/1.13.15/x64

2022/05/18 14:07:34 warn: go/build: importGo github.com/pashagolub/pgxmock/: exit status 2
go: cannot find GOROOT directory: /opt/hostedtoolcache/go/1.13.15/x64

2022/05/18 14:07:34 warn: go/build: importGo github.com/pashagolub/pgxmock/: exit status 2
go: cannot find GOROOT directory: /opt/hostedtoolcache/go/1.13.15/x64

2022/05/18 14:07:34 warn: go/build: importGo github.com/pashagolub/pgxmock/: exit status 2
go: cannot find GOROOT directory: /opt/hostedtoolcache/go/1.13.15/x64
...

Is it because runner doesn't have Go v1.13 installed anymore?

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.