forked from percona/mongodb_exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
61 lines (51 loc) · 2.09 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
dist: trusty
sudo: required
language: go
go:
- 1.11.x
matrix:
allow_failures:
- go: master
env:
# https://www.mongodb.com/support-policy
- MONGODB_IMAGE=mongo:3.4
- MONGODB_IMAGE=mongo:3.6
- MONGODB_IMAGE=mongo:4.0
# https://www.percona.com/services/policies/percona-software-platform-lifecycle#mongodb
- MONGODB_IMAGE=percona/percona-server-mongodb:3.4
- MONGODB_IMAGE=percona/percona-server-mongodb:3.6
- MONGODB_IMAGE=percona/percona-server-mongodb:4.0
services:
- docker
before_script:
# Start docker containers.
- docker-compose up -d
# Wait for MongoDB to become available.
- |
until docker-compose exec mongo mongo --quiet --eval 'db.runCommand("ping").ok' > /dev/null; do
>&2 echo "MongoDB is unavailable - sleeping"
sleep 1
done
>&2 echo "MongoDB is up"
# Display logs for debug purposes.
- docker-compose logs
# Display versions.
- docker --version
- docker-compose --version
- docker-compose exec mongo mongo --version
script:
# ensure that vendor/ is in sync with code and Gopkg.*
- curl https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64 -L -o ~/dep && chmod +x ~/dep
- rm -fr vendor/
- ~/dep ensure -v
- git diff --exit-code
- make format build testall
after_success:
- bash <(curl -s https://codecov.io/bash) -X fix
notifications:
slack:
on_success: change
on_failure: always
rooms:
secure: updWrOALfF29z30ogJ4m21WX0oOSYbRX/+abuEqXCC9zZ2QI7EoRR61hrAgNXJXUTffmUIM0vCrToYlybMsdcZHwCXWN8vr2yW3fyypfs/+rUng1qigEy1wVVIFgAC/6NruhmuUMWo1qwe4tUenQmegBiSpYRVRI10Qsnj6TggCNVz0cuoxpmzpVvNH78s1elnU4P1REWhjStuqQvKgG5cWOsvI+9l2Z+t9HdpYE7E7N3Ec73t2Z4wKhlpScbLF+mhnTWV6zgCkLaVdMshFeBEuYWmRr3D2QJWMntl/DrVaRoW76kX9nm2PQ/P4q0BdQslf5WsAiONWPOOWqK6n9RM9SegGSEXnXiqkWtmJQspa3zhjkNZStaD/g5E4yP5QnTbk4WP8ma18yQfMthXeQiQOEWj6zOTzBslu6Iyyc9QzbNijnYy3ZBBBAWGaKjFKmTrMTgl19SbAsvgi41A+zrVL5LeCwAR0/2QUdMegHZSla9WBiURgT/quA8EnA3N+ObNQBpqBETJmSPpJbqrkZI8+7oo4nFxLkwCRVyI4/XInTl5aKsRNYP95kPX3zJuUEe8x39qYhG5QcGV8G8AK0B+jrGoEB2qSN2p+Ye1XE6+Z38KktVzM3GmMOt/v+ts1ZjiaZvK0zlb7vRTMuiBmAjAnB5l5vmNSjkP6+ZL832Og=
email: false