1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2025-02-15 10:56:08 +00:00

Travis: Remove gotestcover

This commit is contained in:
Alexander Neumann 2018-08-31 20:56:25 +02:00
parent a5a46e4989
commit 8af4b331ef
2 changed files with 12 additions and 6 deletions

View file

@ -42,4 +42,4 @@ script:
- go run run_integration_tests.go - go run run_integration_tests.go
after_success: after_success:
- bash <(curl -s https://codecov.io/bash) -f all.cov - test -r all.cov && bash <(curl -s https://codecov.io/bash) -f all.cov

View file

@ -187,8 +187,6 @@ func (env *TravisEnvironment) Prepare() error {
msg("preparing environment for Travis CI\n") msg("preparing environment for Travis CI\n")
pkgs := []string{ pkgs := []string{
"golang.org/x/tools/cmd/cover",
"github.com/pierrre/gotestcover",
"github.com/NebulousLabs/glyphcheck", "github.com/NebulousLabs/glyphcheck",
"github.com/restic/rest-server/cmd/rest-server", "github.com/restic/rest-server/cmd/rest-server",
"github.com/restic/calens", "github.com/restic/calens",
@ -340,12 +338,20 @@ func (env *TravisEnvironment) RunTests() error {
} }
// run the build script // run the build script
if err := run(args[0], args[1:]...); err != nil { err := run(args[0], args[1:]...)
if err != nil {
return err return err
} }
// run the tests and gather coverage information // run the tests and gather coverage information (for Go >= 1.10)
err := runWithEnv(env.env, "gotestcover", "-coverprofile", "all.cov", "github.com/restic/restic/cmd/...", "github.com/restic/restic/internal/...") switch {
case v.AtLeast(GoVersion{1, 11, 0}):
err = runWithEnv(env.env, "go", "test", "-mod=vendor", "-coverprofile", "all.cov", "./...")
case v.AtLeast(GoVersion{1, 10, 0}):
err = runWithEnv(env.env, "go", "test", "-coverprofile", "all.cov", "./...")
default:
err = runWithEnv(env.env, "go", "test", "./...")
}
if err != nil { if err != nil {
return err return err
} }