-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
47 lines (38 loc) · 1.26 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
language: go
go:
- 1.12.x
branches:
only:
- master
- develop
- fix_travis_yml
before_install:
- sudo apt-get update
- sudo apt-get --yes remove postgresql\*
- sudo apt-get install -y postgresql-11 postgresql-client-11
- sudo cp /etc/postgresql/{9.6,11}/main/pg_hba.conf
- sudo service postgresql restart 11
install:
- go get -u github.com/kardianos/govendor
- go get github.com/onsi/ginkgo/ginkgo
- govendor sync
- export PATH=$PATH:$HOME/gopath/bin
services:
- postgresql
addons:
postgresql: "11.2"
env:
- DATABASE_URL=postgres://postgres:@localhost:5432/travis_ci_test
before_script:
- psql --version
- psql -c 'create database travis_ci_test;' -U postgres
- psql -c 'CREATE ROLE travis SUPERUSER LOGIN CREATEDB;' -U postgres
script: ginkgo --failOnPending=false --noisyPendings=false --randomizeAllSpecs --randomizeSuites --cover --trace --race --compilers=2 -covermode=atomic -coverpkg ./... ./...
after_success:
- wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh
- chmod +x send.sh
- ./send.sh success $WEBHOOK_URL
after_failure:
- wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh
- chmod +x send.sh
- ./send.sh failure $WEBHOOK_URL