-
Notifications
You must be signed in to change notification settings - Fork 36
/
.travis.yml
45 lines (34 loc) · 1.07 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
language: go
notifications:
email: false
go:
- "1.11"
- "1.12"
env:
- GO111MODULE=on
dist: trusty
sudo: required
addons:
postgresql: "9.5"
services:
- mysql
- postgresql
- docker
before_install:
- travis_retry docker pull yandex/clickhouse-server
- docker run -d -p 127.0.0.1:8123:8123 --name dbr-clickhouse-server yandex/clickhouse-server
install:
- travis_retry go get github.com/mattn/goveralls
- travis_retry go get golang.org/x/lint/golint
- psql -c 'create database dbr_ci_test;' -U postgres
- mysql -e 'CREATE DATABASE dbr_ci_test;' -uroot
before_script:
- export DBR_TEST_MYSQL_DSN="root:@tcp(127.0.0.1:3306)/dbr_ci_test?charset=utf8"
- export DBR_TEST_POSTGRES_DSN="postgres://postgres:@127.0.0.1:5432/dbr_ci_test?sslmode=disable"
- export DBR_TEST_CLICKHOUSE_DSN="http://localhost:8123/default"
script:
- $HOME/gopath/bin/golint ./...
- go vet ./...
- test -z "$(gofmt -d -s . | tee /dev/stderr)"
- go test -v -covermode=count -coverprofile=coverage.out
- $HOME/gopath/bin/goveralls -coverprofile=coverage.out -service=travis-ci