jandelgado / gcov2lcov-action Goto Github PK
View Code? Open in Web Editor NEWGithub action to convert go coverage files to lcov format
License: MIT License
Github action to convert go coverage files to lcov format
License: MIT License
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?
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?
When a gcov2lcov version is specified (i.e. v1.0.4), the download link is created as:
https://github.com/jandelgado/gcov2lcov/releases/v1.0.4/download/gcov2lcov-linux-amd64.tar.gz
But it should be:
https://github.com/jandelgado/gcov2lcov/releases/download/v1.0.4/gcov2lcov-linux-amd64.tar.gz
It seems that for latest, it works as:
https://github.com/jandelgado/gcov2lcov/releases/latest/download/gcov2lcov-linux-amd64.tar.gz
But not for specific versions.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.