aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorFelix Lange <fjl@users.noreply.github.com>2018-10-08 22:37:06 +0800
committerGitHub <noreply@github.com>2018-10-08 22:37:06 +0800
commit72a076840bea4a3258a3a8d9a7aeb750fcc2ac02 (patch)
tree0a5f253aea328a308033d64d24caae6a5a239121 /build
parent459278cd57a6188aea3991db3c7f83df70282ad8 (diff)
downloaddexon-72a076840bea4a3258a3a8d9a7aeb750fcc2ac02.tar
dexon-72a076840bea4a3258a3a8d9a7aeb750fcc2ac02.tar.gz
dexon-72a076840bea4a3258a3a8d9a7aeb750fcc2ac02.tar.bz2
dexon-72a076840bea4a3258a3a8d9a7aeb750fcc2ac02.tar.lz
dexon-72a076840bea4a3258a3a8d9a7aeb750fcc2ac02.tar.xz
dexon-72a076840bea4a3258a3a8d9a7aeb750fcc2ac02.tar.zst
dexon-72a076840bea4a3258a3a8d9a7aeb750fcc2ac02.zip
travis, build: speed up CI runs (#17854)
* travis: exclude non-test jobs for PRs We don't usually look at these builders and not starting them removes ~15min of build time. * build: don't run vet before tests Recent versions of Go run vet during 'go test' and we have a dedicated lint job. * build: use -timeout 5m for tests Tests sometimes hang on Travis. CI runs are aborted after 10min with no output. Adding the timeout means we get to see the stack trace for timeouts.
Diffstat (limited to 'build')
-rw-r--r--build/ci.go11
1 files changed, 3 insertions, 8 deletions
diff --git a/build/ci.go b/build/ci.go
index c5a107e1d..1bbc94471 100644
--- a/build/ci.go
+++ b/build/ci.go
@@ -320,9 +320,7 @@ func goToolArch(arch string, cc string, subcmd string, args ...string) *exec.Cmd
// "tests" also includes static analysis tools such as vet.
func doTest(cmdline []string) {
- var (
- coverage = flag.Bool("coverage", false, "Whether to record code coverage")
- )
+ coverage := flag.Bool("coverage", false, "Whether to record code coverage")
flag.CommandLine.Parse(cmdline)
env := build.Env()
@@ -332,14 +330,11 @@ func doTest(cmdline []string) {
}
packages = build.ExpandPackagesNoVendor(packages)
- // Run analysis tools before the tests.
- build.MustRun(goTool("vet", packages...))
-
// Run the actual tests.
- gotest := goTool("test", buildFlags(env)...)
// Test a single package at a time. CI builders are slow
// and some tests run into timeouts under load.
- gotest.Args = append(gotest.Args, "-p", "1")
+ gotest := goTool("test", buildFlags(env)...)
+ gotest.Args = append(gotest.Args, "-p", "1", "-timeout", "5m")
if *coverage {
gotest.Args = append(gotest.Args, "-covermode=atomic", "-cover")
}