76 lines
1.8 KiB
YAML
76 lines
1.8 KiB
YAML
os:
|
|
- linux
|
|
|
|
language: go
|
|
|
|
go:
|
|
- "1.10.x"
|
|
|
|
install: true
|
|
|
|
sudo: required
|
|
|
|
services:
|
|
- docker
|
|
- postgresql
|
|
- mysql
|
|
- mongodb
|
|
|
|
env:
|
|
global:
|
|
- VERSION=0.27.8
|
|
- DB_HOST=localhost
|
|
- DB_USER=travis
|
|
- DB_PASS=
|
|
- DB_DATABASE=test
|
|
- GO_ENV=test
|
|
|
|
matrix:
|
|
allow_failures:
|
|
- go: master
|
|
fast_finish: true
|
|
|
|
before_deploy:
|
|
- git config --local user.name "hunterlong"
|
|
- git config --local user.email "info@socialeck.com"
|
|
- git tag "v$VERSION" --force
|
|
deploy:
|
|
- provider: releases
|
|
api_key: $GH_TOKEN
|
|
file:
|
|
- "build/statup-osx-x64.tar.gz"
|
|
- "build/statup-osx-x32.tar.gz"
|
|
- "build/statup-linux-x64.tar.gz"
|
|
- "build/statup-linux-x32.tar.gz"
|
|
- "build/statup-linux-arm64.tar.gz"
|
|
- "build/statup-linux-arm7.tar.gz"
|
|
- "build/statup-linux-alpine.tar.gz"
|
|
- "build/statup-windows-x64.zip"
|
|
skip_cleanup: true
|
|
|
|
notifications:
|
|
email: false
|
|
|
|
before_script:
|
|
- mysql -e 'CREATE DATABASE IF NOT EXISTS test;'
|
|
- psql -c 'create database test;' -U postgres
|
|
- go get github.com/stretchr/testify/assert
|
|
- go get golang.org/x/tools/cmd/cover
|
|
- go get github.com/mattn/goveralls
|
|
- go install github.com/mattn/goveralls
|
|
- go get github.com/rendon/testcli
|
|
- go get github.com/karalabe/xgo
|
|
- go get github.com/GeertJohan/go.rice
|
|
- go get github.com/GeertJohan/go.rice/rice
|
|
- go get
|
|
|
|
script:
|
|
- if [[ "$TRAVIS_BRANCH" == "master" ]]; then /bin/bash -c .travis/compile.sh; fi
|
|
- go test -v -covermode=count -coverprofile=coverage.out && $GOPATH/bin/goveralls -coverprofile=coverage.out -service=travis -repotoken $COVERALLS
|
|
|
|
after_success:
|
|
- if [[ "$TRAVIS_BRANCH" == "master" ]]; then travis_wait 30 docker pull karalabe/xgo-latest; fi
|
|
- if [[ "$TRAVIS_BRANCH" == "master" ]]; then /bin/bash -c .travis/build.sh; fi
|
|
|
|
after_deploy:
|
|
- /bin/bash -c .travis/deploy.sh |