forked from percona/qan-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
82 lines (72 loc) · 2.59 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
dist: trusty
sudo: required
language: go
go:
- 1.9.x
services:
- docker
env:
global:
- MYSQL_USER="root"
- MYSQL_HOST="127.0.0.1"
- MYSQL_PORT="3406"
- PCT_TEST_MYSQL_DSN="${MYSQL_USER}@tcp(${MYSQL_HOST}:${MYSQL_PORT})/?parseTime=true"
matrix:
- MYSQL_IMAGE=mysql:5.5
- MYSQL_IMAGE=mysql:5.6
- MYSQL_IMAGE=mysql:5.7
- MYSQL_IMAGE=percona/percona-server:5.6
- MYSQL_IMAGE=percona/percona-server:5.7
- MYSQL_IMAGE=mariadb:5.5
- MYSQL_IMAGE=mariadb:10.0
- MYSQL_IMAGE=mariadb:10.1
- MONGODB_IMAGE=mongo:3.2
- MONGODB_IMAGE=mongo:3.4
- MONGODB_IMAGE=percona/percona-server-mongodb:3.2
- MONGODB_IMAGE=percona/percona-server-mongodb:3.4
matrix:
include:
- go: master
env:
allow_failures:
- go: master
addons:
apt:
sources:
- sourceline: "deb http://repo.percona.com/apt $(lsb_release -s -c) testing"
key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&fingerprint=on&search=0x8507EFA5'
packages:
- percona-toolkit
install:
- go get -u github.com/Masterminds/glide
# remove vendor dir and re-fetch it to check later if it's correct with `git diff --exit-code`
- rm -rf vendor/
- glide install
before_script:
# check if vendor dir is correct
- git diff --exit-code
# run docker containers
- docker-compose up -d
# wait for MySQL to become available
- |
until docker-compose exec mysql mysql -u"${MYSQL_USER}" -e 'SELECT 1' > /dev/null; do
>&2 echo "MySQL is unavailable - sleeping"
sleep 1
done
>&2 echo "MySQL is up"
# log versions
- docker --version
- docker-compose --version
- docker-compose exec mysql mysql --version
- docker-compose exec mongo mongo --version
# we need at least one document in test db
- mongo --eval 'db.init.insert({})'
script:
- test/runner.sh
notifications:
email: false
slack:
on_success: change
on_failure: change
rooms:
secure: A/jke9SzibxoGc0H86z5fnGKoLr6xTPBNUcjLMVJ2xzqp8HX90gOdWKenooCu6tyJ0gXX8nUgIOQWsupICy2P2HPGXXKonY4Lq1qRPbxXnlqweaoTf2IZ8SmQeyP6TvNZF9978YRLqRBmJXzq7dcZCF2Gr/1XLPDCNIVJcKgG+heVUubt6q8EnIzB4OYKwUJwZ2ORzleLwqzs8ViB5ffmOXmAVd80rUTcCOailKE4+ML+CQO1MLbGxbdVjacivjM0cvXoibRZF5bhUsg7qoszaWJidJjX9UtW9rRKyPuh1vh1HFgayxmWNeiqe7yyIwGZU37Gnten+4XsVpKYxSOfRWz8TNu01jdDs7e8RgJ29OCwVG88y/yxrBtDlhjsKvy7owV1eAH63YVUJzgoVQZKUt04LAKTMxjEZKBb7o7+GdmSHQWPj8NNmcPEWBwSg99yU3xTQXefgLjqiCQTTNaiNEa1JgPNroKXzAcjJ12qpY5F5MWPFZ2ndTOL2kVEn4iqV7t6bresISXAZKJn+IrjUdZ+ZBr48zcnO7rgWGvszScDWt3oqjRlCbwxXWTL8VoDouylGVAJTUHxo07Bs307cwYiLsUp/2hPvcY2ELXrQXTqk3ZHJkMHa4U+nNvXY9RYNNqFmvAnUCHG6JfBda4b0SCjbCINjQVMCsF5DSXua8=