-
-
Notifications
You must be signed in to change notification settings - Fork 279
/
.travis.yml
52 lines (50 loc) · 1.29 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
dist: trusty
sudo: required
addons:
postgresql: "9.6"
services:
- docker
language: go
os:
- linux
go:
- "1.15.x"
- "1.14.x"
- master
matrix:
allow_failures:
- go: master
fast_finish: true
env:
- PREST_PG_USER=postgres PREST_PG_DATABASE=prest PREST_PG_PORT=5432 PREST_CONF=$TRAVIS_BUILD_DIR/testdata/prest.toml
before_install:
- sudo apt-get -y install gcc-multilib
- go get -v -d ./...
- go get -v github.com/inconshreveable/mousetrap
install:
- go get golang.org/x/tools/cmd/cover
- go get github.com/mattn/goveralls
before_script:
- docker login -u="$DOCKER_LOGIN" -p="$DOCKER_PASSWORD"
- sh testdata/schema.sh
script:
- curl -sfL https://git.io/goreleaser | sh -s -- check
- sh testdata/migrations_test.sh
- env go test -race -covermode=atomic -coverprofile=coverage.out ./...
- $HOME/gopath/bin/goveralls -coverprofile=coverage.out -service=travis-ci -repotoken $COVERALLS_TOKEN
deploy:
- provider: script
skip_cleanup: true
script:
- curl -sL https://git.io/goreleaser | bash
- docker build
- docker push prest/prest:latest
- docker push prest/prest:v1
on:
tags: true
condition: $TRAVIS_OS_NAME = linux
go: "1.15.x"
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/b7314cbdd840e64940fb