Skip to content

Multiple Package Unexpected coverage #120

Description

@someone1

I'm unsure if I'm misunderstanding how to execute goveralls correctly or if something is wonky with its multiple-package execution.

I have a package where I have unit tests and some integration tests. The unit tests cover the packages they're a part of, and the integration tests cover multiple packages.

Typically, I'd use what's in goverall's README and setup my travis file with: $GOPATH/bin/goveralls -service=travis-ci - but this seems to only calculate coverage for my integration test (see coveralls result here). Alternatively, if I do it the "other" way:

$ go test -covermode=count -coverprofile=profile.cov
$ goveralls -coverprofile=profile.cov -service=travis-ci

I get more coverage, except now my integration test is not being counted (see this result)!

To get both types of coverage, I manually constructed my test line as such:

go test -v -coverprofile=coverage.out -covermode=count -coverpkg=github.com/someone1/hydra-gcp,github.com/someone1/hydra-gcp/client,github.com/someone1/hydra-gcp/config,github.com/someone1/hydra-gcp/consent,github.com/someone1/hydra-gcp/jwk,github.com/someone1/hydra-gcp/oauth2 ./...

The result is as expected.

Is there something I'm doing wrong here or is there a possible edge case that goveralls is missing?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions