travis: use build stages and publish release automatically
This commit is contained in:
parent
eb1de77d75
commit
2762348654
44
.travis.yml
44
.travis.yml
|
@ -1,11 +1,9 @@
|
||||||
language: go
|
language: go
|
||||||
go_import_path: github.com/getamis/istanbul-tools
|
|
||||||
sudo: required
|
sudo: required
|
||||||
os: linux
|
|
||||||
dist: trusty
|
|
||||||
go:
|
go:
|
||||||
- 1.7.6
|
- 1.7
|
||||||
- 1.8.3
|
- 1.8
|
||||||
|
- 1.9
|
||||||
env:
|
env:
|
||||||
- TEST=unit
|
- TEST=unit
|
||||||
- TEST=istanbul
|
- TEST=istanbul
|
||||||
|
@ -20,15 +18,33 @@ install:
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- 'if [ ${TEST} = "unit" ]; then
|
- 'if [ ${TEST} = "unit" ]; then
|
||||||
travis_wait 30 go test -v $(glide novendor | grep -v "\.\/tests\/\.\.\.") --timeout 30m;
|
travis_wait 30 go test -v $(glide novendor | grep -v "\.\/tests\/\.\.\.") --timeout 30m;
|
||||||
elif [ ${TEST} = "istanbul" ]; then
|
elif [ ${TEST} = "istanbul" ]; then
|
||||||
cd ${TRAVIS_BUILD_DIR}/tests/functional && travis_wait 120 ginkgo -r --progress;
|
cd ${TRAVIS_BUILD_DIR}/tests/functional && travis_wait 120 ginkgo -r --progress;
|
||||||
elif [ ${TEST} = "quorum" ]; then
|
elif [ ${TEST} = "quorum" ]; then
|
||||||
cd ${TRAVIS_BUILD_DIR}/tests/quorum && travis_wait 120 ginkgo -r --progress;
|
cd ${TRAVIS_BUILD_DIR}/tests/quorum && travis_wait 120 ginkgo -r --progress;
|
||||||
else
|
else
|
||||||
echo "Invalid env"
|
echo "Invalid env"
|
||||||
exit 2;
|
exit 2;
|
||||||
fi'
|
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:
|
notifications:
|
||||||
webhooks:
|
webhooks:
|
||||||
|
|
Loading…
Reference in New Issue