-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
36 lines (33 loc) · 999 Bytes
/
.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
addons:
postgresql: "11"
apt:
packages:
- postgresql-11
- postgresql-client-11
services:
- postgresql
cache:
apt: true
go: true
directories:
- $HOME/.cache
- $HOME/bin
- $HOME/gopath/pkg/mod
language: go
go: 1.13
env:
global:
- GO111MODULE=on
- PGPORT=5433
- "venderctl_db_url=postgresql://postgres@:5433/venderctl_test"
# sudo: true
# https://github.com/travis-ci/travis-ci/issues/9624
before_install:
- sudo sed -i -e '/local.*peer/s/postgres/all/' -e 's/peer\|md5/trust/g' /etc/postgresql/*/main/pg_hba.conf
- sudo systemctl restart postgresql@11-main
- sleep 1
install: $HOME/bin/golangci-lint || curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b $HOME/bin v1.19.1
before_script: psql -U postgres -c 'select version()' -c 'create database venderctl_test'
script: script/test
before_cache: rm -f $HOME/.cache/go-build/log.txt
after_success: if [[ -z "$task" ]] ; then bash <(curl -s https://codecov.io/bash) ; fi