Add timeout for test execution

This commit is contained in:
mhmxs 2019-09-14 14:11:24 +02:00
parent 45877a7a82
commit bfd7d0c46b
2 changed files with 4 additions and 4 deletions

View file

@ -15,7 +15,7 @@ pipeline:
- go get -u golang.org/x/net/context/ctxhttp - go get -u golang.org/x/net/context/ctxhttp
- go get -u github.com/golang/protobuf/proto - go get -u github.com/golang/protobuf/proto
- go get -u github.com/golang/protobuf/protoc-gen-go - go get -u github.com/golang/protobuf/protoc-gen-go
- go test -cover $(go list ./... | grep -v /vendor/) - go test -cover -timeout 30s $(go list ./... | grep -v /vendor/)
test_postgres: test_postgres:
image: golang:1.12.4 image: golang:1.12.4
@ -23,7 +23,7 @@ pipeline:
- DATABASE_DRIVER=postgres - DATABASE_DRIVER=postgres
- DATABASE_CONFIG=host=postgres user=postgres dbname=postgres sslmode=disable - DATABASE_CONFIG=host=postgres user=postgres dbname=postgres sslmode=disable
commands: commands:
- go test github.com/laszlocph/woodpecker/store/datastore - go test -timeout 30s github.com/laszlocph/woodpecker/store/datastore
test_mysql: test_mysql:
image: golang:1.12.4 image: golang:1.12.4
@ -31,7 +31,7 @@ pipeline:
- DATABASE_DRIVER=mysql - DATABASE_DRIVER=mysql
- DATABASE_CONFIG=root@tcp(mysql:3306)/test?parseTime=true - DATABASE_CONFIG=root@tcp(mysql:3306)/test?parseTime=true
commands: commands:
- go test github.com/laszlocph/woodpecker/store/datastore - go test -timeout 30s github.com/laszlocph/woodpecker/store/datastore
build: build:
image: golang:1.12.4 image: golang:1.12.4

View file

@ -12,4 +12,4 @@ pipeline:
test: test:
image: golang:1.8 image: golang:1.8
commands: commands:
- go test -cover github.com/laszlocph/woodpecker/cncd/pipeline/... - go test -cover -timeout 30s github.com/laszlocph/woodpecker/cncd/pipeline/...