go-playground / overalls Goto Github PK
View Code? Open in Web Editor NEW:jeans:Multi-Package go project coverprofile for tools like goveralls
License: MIT License
:jeans:Multi-Package go project coverprofile for tools like goveralls
License: MIT License
I believe the current default of -covermode=count
with -race
can cause race conditions. See this gist for an example.
https://gist.github.com/mmcloughlin/6ec7d19a354ff2869350432f37628663
I've just noticed that this project depends on "github.com/yookoala/realpath" which is licensed under GPL-like dependency. I'm not sure, but may be it's impossible to have this project licensed under MIT because of it. Anyway, thanks for a perfect library :)
This is due to a problem with how the realpath
package handles detecting absolute paths. yookoala/realpath#2 has a fix.
This is a neat tool: https://github.com/kyoh86/richgo
I'd like to add a flag to overalls that allows us to specify e.g. --go-cmd=richgo
(default would be "go").
Thoughts/objections?
As far as I know, the go tools ignore two special folders: testdata
and anything that begins .
. Should we do the same here?
Our CI system checks out git repositories with no consideration for go workspace layouts.
go test
still works inside the checkout directory, but it's impossible to use overalls to run it without shuffling things around
As part of my CI build process, the source is mounted at /source
. I then create a symbolic link from /source
to /go/src/github.com/F21/myproject
.
Unfortunately, when symbolic links are used, overalls is not able to find the tests in the project. The current solution is to copy the contents of /source
to /go/src/github.com/F21/myproject
, but support for symbolic links would be super awesome!
I tried using this tool to get a coverage report similar to goveralls but the lack of the "--coverpkg"
arg caused it to give a much different result. You can see goveralls is using --coverpkg here:
https://github.com/mattn/goveralls/blob/master/goveralls.go#L124
I suggest that you make this the command because I would guess that most people seeking multi-package coverage have package that depend on each other and this is what they want. Otherwise the results are confusing because it says you have no coverage when you really do.
go test -covermode=count -coverprofile=profile.coverprofile -coverpkg=./...
We run our tests in CI with -race -v
, it'd be nice if we could keep the same output, while still using overalls to actually run the tests per package and merge the coverage output.
Being able to pass arguments like go list
takes would also be nice.
I'm happy to try and add this myself, but that would require a bit of bikeshedding (of test output, of arguments) so I wanted to bring this up for discussion first
Maybe I missed something in the README, but do you support the -args
flag ?
For example if I use the library like :
overalls -project=github.com/erwanlbp/ionline -covermode=count -- -args -flag1 something
The -args
should be at the end of the go test command, because every thing after args
is sent to the program unparsed.
What I get is something like :
go test -args -flag1 something -covermode=count -coverprofile=profile.coverprofile -outputdir=/path/to/package ./path/to/package
And so it only test for the root package, which doesn't contain tests
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.