statping-ng/.travis.yml

80 lines
1.5 KiB
YAML

os:
- linux
language: go
go:
- "1.11.1"
go_import_path: github.com/hunterlong/statup
cache:
directories:
- $GOPATH/pkg/dep
- ~/.npm
- ~/.cache
- $GOPATH/src/github.com/hunterlong/statup/vendor
sudo: required
services:
- docker
- postgresql
- mysql
- mongodb
env:
global:
- DB_HOST=localhost
- DB_USER=travis
- DB_PASS=
- DB_DATABASE=test
- GO_ENV=test
- STATUP_DIR=$GOPATH/src/github.com/hunterlong/statup
before_deploy:
- git config --local user.name "hunterlong"
- git config --local user.email "info@socialeck.com"
- make tag
after_deploy:
- if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" = "false" ]]; then make publish-homebrew; fi
deploy:
- provider: releases
api_key: $GH_TOKEN
skip_cleanup: true
matrix:
allow_failures:
- go: master
fast_finish: true
notifications:
email: true
branches:
except:
- /^v\d/
before_install:
- curl -L -s https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64 -o $GOPATH/bin/dep
- chmod +x $GOPATH/bin/dep
- gem install sass
install:
- make dev-deps
- make dep
- make install
before_script:
- mysql -e 'CREATE DATABASE IF NOT EXISTS test;'
- psql -c 'create database test;' -U postgres
script:
- make test-all
- if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" = "false" ]]; then make coverage; fi
after_success:
- if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" = "false" ]]; then make travis-build; fi