54 lines
1.1 KiB
YAML
54 lines
1.1 KiB
YAML
language: go
|
|
sudo: required
|
|
go:
|
|
- 1.7
|
|
- 1.8
|
|
- 1.9
|
|
env:
|
|
- TEST=unit
|
|
- TEST=istanbul
|
|
- TEST=quorum
|
|
|
|
services:
|
|
- docker
|
|
|
|
install:
|
|
- go get github.com/Masterminds/glide
|
|
- go get github.com/onsi/ginkgo/ginkgo
|
|
|
|
script:
|
|
- 'if [ ${TEST} = "unit" ]; then
|
|
travis_wait 30 go test -v $(glide novendor | grep -v "\.\/tests\/\.\.\.") --timeout 30m;
|
|
elif [ ${TEST} = "istanbul" ]; then
|
|
cd ${TRAVIS_BUILD_DIR}/tests/functional && travis_wait 120 ginkgo -r --progress;
|
|
elif [ ${TEST} = "quorum" ]; then
|
|
cd ${TRAVIS_BUILD_DIR}/tests/quorum && travis_wait 120 ginkgo -r --progress;
|
|
else
|
|
echo "Invalid env"
|
|
exit 2;
|
|
fi'
|
|
branches:
|
|
only:
|
|
- develop
|
|
|
|
jobs:
|
|
include:
|
|
- stage: release
|
|
go: 1.9
|
|
if: tag =~ ^v
|
|
env:
|
|
- TEST=none
|
|
- REV="$TRAVIS_TAG"
|
|
deploy:
|
|
provider: releases
|
|
api_key: "$GITHUB_OAUTH_TOKEN"
|
|
skip_cleanup: true
|
|
on:
|
|
tags: true
|
|
|
|
notifications:
|
|
webhooks:
|
|
urls:
|
|
- https://webhooks.gitter.im/e/250f433972aaec17b964
|
|
on_success: always
|
|
on_failure: always |